aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/examples/xref_examples.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-03-02 15:19:44 +0100
committerBjörn Gustavsson <[email protected]>2017-03-02 15:33:44 +0100
commit209985d1eca6389e363c4dc0dac7c91f9415de28 (patch)
treeae5924578b264a7499c0150389d825cc114042c4 /lib/tools/examples/xref_examples.erl
parent74e9234a87f6fac98900201a481696b31df2bdab (diff)
downloadotp-209985d1eca6389e363c4dc0dac7c91f9415de28.tar.gz
otp-209985d1eca6389e363c4dc0dac7c91f9415de28.tar.bz2
otp-209985d1eca6389e363c4dc0dac7c91f9415de28.zip
tools: Use portable lookup of home directory
In the xref example, use init:get_argument(home) to find the location of the home directory.
Diffstat (limited to 'lib/tools/examples/xref_examples.erl')
-rw-r--r--lib/tools/examples/xref_examples.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tools/examples/xref_examples.erl b/lib/tools/examples/xref_examples.erl
index 4c082195a2..f7e71c9708 100644
--- a/lib/tools/examples/xref_examples.erl
+++ b/lib/tools/examples/xref_examples.erl
@@ -7,7 +7,7 @@
%% ${HOME}/unused_locals.txt.
script() ->
Root = code:root_dir(),
- Dir = os:getenv("HOME"),
+ {ok,[[Dir]]} = init:get_argument(home),
Server = s,
xref:start(Server),
{ok, _Relname} = xref:add_release(Server, code:lib_dir(), {name,otp}),