Paths with spaces in them break using sh
Right now if you have a pre or post command like this:
[[InstallPost]]
cmd = "sh"
args = ["-c", "mv thing* dest dir/"]
Will always fail because it's seeing dest dir
as two args to mv
.
Clarifying: This is where you're using sh
to mv
using a glob into a destination directory which has a space in its path.
You can work around this by not using sh
so you get a glob, and simply do individual mv
commands for each file or directory you wish to mv
.
Escaping such paths may be possible in certain scenarios, but consider trying to mv
or cp
something from one location into {{.RunWorkDir}}
, where that path is something like .../drive_c/Fallout 3
. This will fail because Fallout
and 3
are seen as two args. We need some way of reliably detecting this.
Possible Solutions
-
Escape
args
for pre/post commands: This is problematic because you don't want to escape every space. But how do we know when to escape and when not to? This is where things seem to get pretty complicated. - ????
Edited by Hristos N. Triantafillou