diff options
author | Björn Gustavsson <[email protected]> | 2017-03-02 15:19:44 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-03-02 15:33:44 +0100 |
commit | 209985d1eca6389e363c4dc0dac7c91f9415de28 (patch) | |
tree | ae5924578b264a7499c0150389d825cc114042c4 /lib | |
parent | 74e9234a87f6fac98900201a481696b31df2bdab (diff) | |
download | otp-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')
-rw-r--r-- | lib/tools/examples/xref_examples.erl | 2 |
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}), |