Browse Source

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.
pull/3/head
joewilliams 13 years ago
parent
commit
fb8732085e
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      src/rebar_upgrade.erl

+ 3
- 4
src/rebar_upgrade.erl View File

@ -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) ->

Loading…
Cancel
Save