diff options
author | Eric <[email protected]> | 2012-12-31 15:19:18 -0500 |
---|---|---|
committer | Eric <[email protected]> | 2012-12-31 15:19:18 -0500 |
commit | a0bd0b37822999f87786d670529624594c82b0a8 (patch) | |
tree | 91cc6038677562d873fae1f212c4aeb6e2aad6f2 /src | |
parent | 059d9f6d28d8f4e963f556401e23eed44fc44b9d (diff) | |
download | relx-a0bd0b37822999f87786d670529624594c82b0a8.tar.gz relx-a0bd0b37822999f87786d670529624594c82b0a8.tar.bz2 relx-a0bd0b37822999f87786d670529624594c82b0a8.zip |
fix bug in goalless configs
Diffstat (limited to 'src')
-rw-r--r-- | src/rcl_prv_release.erl | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/rcl_prv_release.erl b/src/rcl_prv_release.erl index 66f4e11..8a86e02 100644 --- a/src/rcl_prv_release.erl +++ b/src/rcl_prv_release.erl @@ -47,6 +47,8 @@ do(State) -> find_default_release(State, DepGraph). -spec format_error(ErrorDetail::term()) -> iolist(). +format_error(no_goals_specified) -> + "No goals specified for this release ~n"; format_error({no_release_name, Vsn}) -> io_lib:format("A target release version was specified (~s) but no name", [Vsn]); format_error({invalid_release_info, Info}) -> @@ -151,11 +153,16 @@ solve_release(State0, DepGraph, RelName, RelVsn) -> try Release = rcl_state:get_release(State0, RelName, RelVsn), Goals = rcl_release:goals(Release), - case rcl_depsolver:solve(DepGraph, Goals) of - {ok, Pkgs} -> - set_resolved(State0, Release, Pkgs); - {error, Error} -> - ?RCL_ERROR({failed_solve, Error}) + case Goals of + [] -> + ?RCL_ERROR(no_goals_specified); + _ -> + case rcl_depsolver:solve(DepGraph, Goals) of + {ok, Pkgs} -> + set_resolved(State0, Release, Pkgs); + {error, Error} -> + ?RCL_ERROR({failed_solve, Error}) + end end catch throw:not_found -> |