I'm running into an error with the coursier fetch ...
# development
p
I'm running into an error with the coursier fetch script (in the pants repo), because my venv path has special characters in it.
Copy code
__coursier/coursier_fetch_wrapper_script.sh: line 11: syntax error near unexpected token `R'
Line 11 in the script (from
--no-process-cleanup
) is:
Copy code
/home/cognifloyd/.cache/pants/pants_dev_deps/Linux.x86_64.Intel(R).Core(TM).i7-3610QM.CPU.@.2.30GHz.py37.venv/bin/python __coursier/coursier_post_processing_script.py "$json_output_file"
So, bash doesn't like the
()
chars it seems. I'm not sure why I have all of those chars in the venv name, does anyone know where that comes from? The naive fix is to surround
{python_path}
with quotes
'{python_path}'
here: https://github.com/pantsbuild/pants/blob/main/src/python/pants/jvm/resolve/coursier_setup.py#L83 Is there a better way to escape that? eg what happens if a path has a
'
in it (why I don't know. But I don't know why I have
()
chars either)? Also, is there anything else in those scripts that might need shell escaping?
So
uname -mps
with some transforms.
p
Cool. I wonder if that needs any cleanups beyond
's/ /./g'
, like removing other special characters?
e
You're in a good position to work the problem if you're amenable.
p
I've got errands to run right now, but I can try later. For any pointers on what you think the best solution might be?
e
I think you pointed right at it. Just quote the
python_path
in the coursier wrapper script template.
p