|
@ -14,6 +14,7 @@ |
|
|
-spec set_paths(targets(), rebar_state:t()) -> ok. |
|
|
-spec set_paths(targets(), rebar_state:t()) -> ok. |
|
|
set_paths(UserTargets, State) -> |
|
|
set_paths(UserTargets, State) -> |
|
|
Targets = normalize_targets(UserTargets), |
|
|
Targets = normalize_targets(UserTargets), |
|
|
|
|
|
?DIAGNOSTIC("Setting paths to ~p", [Targets]), |
|
|
GroupPaths = path_groups(Targets, State), |
|
|
GroupPaths = path_groups(Targets, State), |
|
|
Paths = lists:append(lists:reverse([P || {_, P} <- GroupPaths])), |
|
|
Paths = lists:append(lists:reverse([P || {_, P} <- GroupPaths])), |
|
|
code:add_pathsa(Paths), |
|
|
code:add_pathsa(Paths), |
|
@ -24,6 +25,7 @@ set_paths(UserTargets, State) -> |
|
|
-spec unset_paths(targets(), rebar_state:t()) -> ok. |
|
|
-spec unset_paths(targets(), rebar_state:t()) -> ok. |
|
|
unset_paths(UserTargets, State) -> |
|
|
unset_paths(UserTargets, State) -> |
|
|
Targets = normalize_targets(UserTargets), |
|
|
Targets = normalize_targets(UserTargets), |
|
|
|
|
|
?DIAGNOSTIC("Removing ~p paths", [Targets]), |
|
|
GroupPaths = path_groups(Targets, State), |
|
|
GroupPaths = path_groups(Targets, State), |
|
|
Paths = lists:append([P || {_, P} <- GroupPaths]), |
|
|
Paths = lists:append([P || {_, P} <- GroupPaths]), |
|
|
[code:del_path(P) || P <- Paths], |
|
|
[code:del_path(P) || P <- Paths], |
|
@ -240,4 +242,4 @@ get_runtime_apps([App|Rest0], AppsAcc0, AppsList) -> |
|
|
error -> {Rest, Acc} |
|
|
error -> {Rest, Acc} |
|
|
end |
|
|
end |
|
|
end, {Rest0, sets:add_element(App, AppsAcc0)}, TotalApps), |
|
|
end, {Rest0, sets:add_element(App, AppsAcc0)}, TotalApps), |
|
|
get_runtime_apps(Rest1 ++ TotalApps, AppsAcc1, AppsList). |
|
|
|
|
|
|
|
|
get_runtime_apps(Rest1 ++ TotalApps, AppsAcc1, AppsList). |