Open deepnight opened 3 years ago
After some testing, it seems like when having multiple double-quotes, the command sent to the shell is "trimmed" by Sys.command
:
"path/to/some.exe" --arg "quotedArgument"
becomes:
path/to/some.exe" --arg "quotedArgument
Which target and OS?
It was on Win10, and "no target": it was while using Haxe interpreter directly (for an Haxelib)
I found that if you directly run the following command from bash/ms-dos, an error will occurs
haxe -cp src -js bin/app.js --macro exclude("haxe.iterators.ArrayIterrator")
# (unknown) : Class<haxe.iterators.ArrayIterator> should be String
# (unknown) : ... For function argument 'pack'
But if you save the command to hxml file or use ('
) instead of ("
) then it will works normally
Edit: This should be another issue
The following command fails for no reason:
This seems to be related to the presence of double-quotes around both exe path and argument.
Workaround: use
sys.io.Process
:For some reason, it seems like
Sys.command
implementation differs fromsys.io.Process
🤔