sribe
June 24, 2022, 3:01am
1
Just upgrading to latest Erlang (25.0.2) & Elixir (1.13.4):
❯ mix deps.compile
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `/Users/sribe/.mix/rebar3 bare compile --paths /Users/sribe/Desktop/Projects/Colvin/PedCard_work/(supporting projects)/utilities/_build/dev/lib/*/ebin'
1 Like
kip
June 24, 2022, 3:17am
2
Just judging by the error alone it looks like rebar
isn’t liking a path with (
in it. Maybe try the rebar3 bare compile ....
command directly from the shell and see if you get the same error?
1 Like
sribe
June 26, 2022, 1:33pm
3
I believe the problem is that the path given to rebar is not quoted properly–it would break with spaces even without parens. I just don’t know where to look…
2 Likes
I think this is the place that is missing the quoting:
File.write!(config_path, rebar_config(dep))
env = [
# REBAR_BARE_COMPILER_OUTPUT_DIR is only honored by rebar3 >= 3.14
{"REBAR_BARE_COMPILER_OUTPUT_DIR", build_path},
{"REBAR_CONFIG", config_path},
{"REBAR_PROFILE", "prod"},
{"TERM", "dumb"}
]
cmd = "#{rebar_cmd(dep)} bare compile --paths #{lib_path}"
do_command(dep, config, cmd, false, env)
build_priv = Path.join(build_path, "priv")
dep_priv = Path.join(dep_path, "priv")
# Copy priv/ after compilation too if it was created then
if File.exists?(dep_priv) and not File.exists?(build_priv) do
Mix.Utils.symlink_or_copy(config[:build_embedded], dep_priv, build_priv)
end