diff --git a/apps/rebar/src/rebar_prv_shell.erl b/apps/rebar/src/rebar_prv_shell.erl index c6fb55995..efc0b68fd 100644 --- a/apps/rebar/src/rebar_prv_shell.erl +++ b/apps/rebar/src/rebar_prv_shell.erl @@ -361,7 +361,8 @@ simulate_proc_lib() -> maybe_run_eval(State) -> Exprs = find_evals_to_run(State), - lists:map(fun(Expr) -> + lists:map(fun(Expr0) -> + Expr = maybe_append_dot(Expr0), ?INFO("Evaluating: ~p",[Expr]), {ok, _} = eval(Expr) end, Exprs). @@ -386,6 +387,15 @@ eval(Expression) -> end end. +maybe_append_dot(Expression) -> + case re:run(Expression, "\\.\\s*$", [{capture, none}, unicode]) of + nomatch -> + ?DEBUG("Appending missing '.' to the end of ~p",[Expression]), + Expression ++ "."; + match -> + Expression + end. + setup_name(State) -> {Long, Short, Opts} = rebar_dist_utils:find_options(State), rebar_dist_utils:either(Long, Short, Opts).