Skip to content

Commit

Permalink
Support XDG_DATA_HOME
Browse files Browse the repository at this point in the history
Resolves #120
  • Loading branch information
jjcarstens committed Dec 22, 2020
1 parent e9bc12d commit b396a52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/nerves_hub_cli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ defmodule NervesHubCLI do

def home_dir do
override_dir =
Application.get_env(:nerves_hub_cli, :home_dir) || System.get_env("NERVES_HUB_HOME")
Application.get_env(:nerves_hub_cli, :home_dir) ||
System.get_env("NERVES_HUB_HOME") ||
System.get_env("XDG_DATA_HOME")

if override_dir == nil or override_dir == "" do
Path.expand("~/.nerves-hub")
Expand Down

0 comments on commit b396a52

Please sign in to comment.