aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric <[email protected]>2012-12-10 15:02:14 -0500
committerEric <[email protected]>2012-12-10 15:07:24 -0500
commit73c1e64c805376460fc2e26db810877cb89bc04b (patch)
tree9ce8e4146cca1e0df240ad5ed7ea91759cf749c8 /src
parent8229c7b27f20198b18b1eb67b9b8247282404331 (diff)
downloadrelx-73c1e64c805376460fc2e26db810877cb89bc04b.tar.gz
relx-73c1e64c805376460fc2e26db810877cb89bc04b.tar.bz2
relx-73c1e64c805376460fc2e26db810877cb89bc04b.zip
make sure that rcl_cmd_args does not create the output dir too early
Diffstat (limited to 'src')
-rw-r--r--src/rcl_cmd_args.erl15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/rcl_cmd_args.erl b/src/rcl_cmd_args.erl
index 68bd9ce..d72bce3 100644
--- a/src/rcl_cmd_args.erl
+++ b/src/rcl_cmd_args.erl
@@ -75,9 +75,6 @@ format_error({invalid_config_file, Config}) ->
io_lib:format("Invalid configuration file specified: ~s", [Config]);
format_error({failed_to_parse, Spec}) ->
io_lib:format("Unable to parse spec ~s", [Spec]);
-format_error({unable_to_create_output_dir, OutputDir}) ->
- io_lib:format("Unable to create output directory (possible permissions issue): ~s",
- [OutputDir]);
format_error({not_directory, Dir}) ->
io_lib:format("Library directory does not exist: ~s", [Dir]);
format_error({invalid_log_level, LogLevel}) ->
@@ -148,17 +145,7 @@ convert_goals([RawSpec | Rest], Acc) ->
{ok, rcl_state:cmd_args()} | relcool:error().
create_output_dir(Opts, Acc) ->
OutputDir = proplists:get_value(output_dir, Opts, "./_rel"),
- case filelib:is_dir(OutputDir) of
- false ->
- case rcl_util:mkdir_p(OutputDir) of
- ok ->
- create_lib_dirs(Opts, [{output_dir, OutputDir} | Acc]);
- {error, _} ->
- ?RCL_ERROR({unable_to_create_output_dir, OutputDir})
- end;
- true ->
- create_lib_dirs(Opts, [{output_dir, OutputDir} | Acc])
- end.
+ create_lib_dirs(Opts, [{output_dir, OutputDir} | Acc]).
-spec create_lib_dirs([getopt:option()], rcl_state:cmd_args()) ->
{ok, rcl_state:cmd_args()} | relcool:error().