This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


2016-11-13 23:19 GMT+01:00 OwN-3m-All wrote:
> cd "C:\test\with space"
> set WD=%~dp0
> echo "%WD%cygTemp"
> "setup-x86_64.exe" --root "%WD%" --local-package-dir "%WD%cygTemp"
> pause
>

The problem is this trailing backslash in the directory name.

D:\temp\Neuer Ordner\cygwinpkg>setup_script.bat

D:\temp\Neuer Ordner\cygwinpkg>set WD=D:\temp\Neuer Ordner\cygwinpkg\

D:\temp\Neuer Ordner\cygwinpkg>echo "D:\temp\Neuer Ordner\cygwinpkg\"
"D:\temp\Neuer Ordner\cygwinpkg\"

D:\temp\Neuer Ordner\cygwinpkg>"setup-x86_64.exe" --root
"D:\temp\Neuer Ordner\cygwinpkg\" --local-package-dir "D:\temp\Neuer
Ordner\cygwinpkg\"


Try adding a dot:

set WD=%~dp0
echo "%WD%."
"setup-x86_64.exe" --root "%WD%." --local-package-dir "%WD%."
pause


> 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.

You'll get a warning from Setup:  it is strongly recommended, to use a
root path without spaces.


> Please let me know if this is possible.

I don't know, never tried, I always used C:\cygwin as root.

Regards,
Gerrit

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]