Parcourir la 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 il y a 13 ans
Parent
révision
fb8732085e
1 fichiers modifiés avec 3 ajouts et 4 suppressions
  1. +3
    -4
      src/rebar_upgrade.erl

+ 3
- 4
src/rebar_upgrade.erl Voir le fichier

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

Chargement…
Annuler
Enregistrer