diff options
author | joewilliams <joe@joetify.com> | 2011-10-17 18:40:45 -0700 |
---|---|---|
committer | joewilliams <joe@joetify.com> | 2011-10-17 18:40:45 -0700 |
commit | fb8732085e8e851a4f0c9cc97d949c0dc489ce3d (patch) | |
tree | 0daff4c8473273a597212acb3f0989376810d921 | |
parent | 644bb0a312614b7d30976505fe013394f9782b01 (diff) |
Better code path handling during upgrades
While building a upgrade package rebar will add new paths to the
internal erlang path, these paths and their order have effects on how
the package is built. This patch should fix some corner cases where a
user can receive a "undefined application" error.
-rw-r--r-- | src/rebar_upgrade.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rebar_upgrade.erl b/src/rebar_upgrade.erl index fb14707..8666fe5 100644 --- a/src/rebar_upgrade.erl +++ b/src/rebar_upgrade.erl @@ -111,13 +111,12 @@ setup(OldVerPath, NewVerPath, NewName, NewVer, NameVer) -> {ok, _} = file:copy(Src, Dst), ok = code:add_pathsa( lists:append([ + filelib:wildcard(filename:join([NewVerPath, + "lib", "*", "ebin"])), filelib:wildcard(filename:join([OldVerPath, "releases", "*"])), filelib:wildcard(filename:join([OldVerPath, - "lib", "*", "ebin"])), - filelib:wildcard(filename:join([NewVerPath, - "lib", "*", "ebin"])), - filelib:wildcard(filename:join([NewVerPath, "*"])) + "lib", "*", "ebin"])) ])). run_systools(NewVer, Name) -> |