Cygwin Setup Command-line Arguments - Paths with a Space Incorrectly Parsed

Sun Nov 13 23:17:00 GMT 2016

Is there a way to pass in paths that contain a space in the --root and
--local-package-dir Cygwin command-line arguments?  Everything I've
tried doesn't work.

Here's a sample batch script to reproduce the issue (create a
directory with a space in it, copy Cygwin setup exe, and then save
batch script into this directory):

cd "C:\test\with space"
set WD=%~dp0
echo "%WD%cygTemp"
"setup-x86_64.exe" --root "%WD%" --local-package-dir "%WD%cygTemp"

If I double quote the path as expected for path variables that may
contain a space in batch, Cygwin incorrectly parses the above
command-line arguments.  I know it is NOT recommended to install
Cygwin with a path that contains spaces, but according to the
documentation, "Cygwin does support spaces in filenames and paths."
But, it doesn't appear to when passing in parameters to the setup?

I'd like to automate Cygwin installation, but I don't want to rule out
the possibility that a path with a space will not be used.

Please let me know if this is possible.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list