Skip to content

Commit d7043b9

Browse files
committed
Hard fail if misconfigured
1 parent 1c18399 commit d7043b9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

deps/rabbitmq_ct_helpers/src/rabbit_ct_helpers.erl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,12 @@ ensure_secondary_dist(Config) ->
207207
undefined -> os:getenv("SECONDARY_DIST");
208208
P -> P
209209
end,
210-
%% @tod Hard fail if file doesn't exist.
210+
%% Hard fail if the path is invalid.
211211
case Path =/= false andalso filelib:is_dir(Path) of
212-
true -> set_config(Config, {secondary_dist, Path});
213-
false -> set_config(Config, {secondary_dist, false})
214-
end.
212+
true -> ok;
213+
false -> error(secondary_dist_path_invalid)
214+
end,
215+
set_config(Config, {secondary_dist, Path}).
215216

216217
ensure_secondary_umbrella(Config) ->
217218
Path = case get_config(Config, secondary_umbrella) of

0 commit comments

Comments
 (0)