aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-03-03 11:52:10 +0100
committerBjörn Gustavsson <[email protected]>2017-03-03 11:52:10 +0100
commitb14e556b334069ca60b1be1a1ed45374daf8e1fc (patch)
tree3e6c9c951e5a1e2cdfb459b4c9b6a978c055cd80 /lib/dialyzer
parente7ec27f781b2db75b7b82903ae73f089a1b3286a (diff)
parent0438c6c2c5c4a447ab3a47a443968488a0d835eb (diff)
downloadotp-b14e556b334069ca60b1be1a1ed45374daf8e1fc.tar.gz
otp-b14e556b334069ca60b1be1a1ed45374daf8e1fc.tar.bz2
otp-b14e556b334069ca60b1be1a1ed45374daf8e1fc.zip
Merge branch 'maint'
* maint: tools: Use portable lookup of home directory dialyzer, observer: Use portable lookup of home directory
Diffstat (limited to 'lib/dialyzer')
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index eb63e9e695..bfd3f84fc5 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -233,12 +233,8 @@ contains_mfa(#plt{info = Info, contracts = Contracts}, MFA) ->
get_default_plt() ->
case os:getenv("DIALYZER_PLT") of
false ->
- case os:getenv("HOME") of
- false ->
- plt_error("The HOME environment variable needs to be set " ++
- "so that Dialyzer knows where to find the default PLT");
- HomeDir -> filename:join(HomeDir, ".dialyzer_plt")
- end;
+ {ok,[[HomeDir]]} = init:get_argument(home),
+ filename:join(HomeDir, ".dialyzer_plt");
UserSpecPlt -> UserSpecPlt
end.