Skip to content

Commit

Permalink
ShellArgs default should be [] (not undefined)
Browse files Browse the repository at this point in the history
  • Loading branch information
choptastic committed Aug 13, 2023
1 parent 7772a6c commit 6e822c4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/rebar/src/rebar_prv_shell.erl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ format_error(Reason) ->
shell(State) ->
setup_name(State),
setup_paths(State),
ShellArgs = debug_get_value(shell_args, rebar_state:get(State, shell, []), undefined,
ShellArgs = debug_get_value(shell_args, rebar_state:get(State, shell, []), [],
"Found shell args from command line option or plugin."),
setup_shell(ShellArgs),
maybe_run_script(State),
Expand Down Expand Up @@ -175,8 +175,6 @@ setup_shell(ShellArgs) ->
ok = start_interactive(ShellArgs)
end.

start_interactive(undefined) ->
start_interactive([]);
start_interactive(ShellArgs) ->
apply(shell, start_interactive, ShellArgs).

Expand Down Expand Up @@ -228,7 +226,7 @@ setup_new_shell(ShellArgs) ->
_ = supervisor:terminate_child(kernel_sup, user),
%% start a new shell (this also starts a new user under the correct group)
case ShellArgs of
undefined ->
[] ->
_ = user_drv:start();
_ ->
_ = user_drv:start(ShellArgs)
Expand Down

0 comments on commit 6e822c4

Please sign in to comment.