Closed starccy closed 2 years ago
for this use case i suggest duckscript, since basically the variable expansion is up to the OS to do
[tasks.cp2]
script_runner = "@duckscript"
script = """
echo ${A_PATH}
cp ${A_PATH} ./test.txt
"""
if its a glob, take a look at glob_cp
Thanks for your advice, I would check it out.
closing this for now since i think we have a better solution.
Problem
On Windows cmd,
copy
would fail when the path contains/
, they should be converted to\
.I see there has been implemented: Convert '/' to '\' in command arguments.
However, it still can lead to errors while using variables, because slash inside variables will not be converted.
To Reproduce
Here is a minimal
Makefile.toml
to reproduce.