From: Josh Thompson <josh_thompson@ncsu.edu>
To: cygwin@cygwin.com
Cc: dev@vcl.apache.org
Subject: change in handling quotes in cygwin package from 3.1.4-1 to 3.1.5-1
Date: Mon, 15 Jun 2020 12:21:28 -0400 [thread overview]
Message-ID: <3394273.JRUgpOGd2y@dvr> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Cygwin community,
I'm a developer on the Apache VCL project which is a private cloud management
platform. We've used Cygwin for many years to allow VCL management systems to
ssh in to Windows nodes to manage them. We're very grateful for the Cygwin
project and how helpful it has been to us for many years. :)
We recently noticed a change in double quote (") handling that is causing a
command we issue to fail. The command is:
cmd.exe /c "mkdir \"C:/Cygwin/home/root/VCL\""
In 3.1.4-1 and previous versions, the command works as expected.
In 3.1.5-1, it returns this error:
The filename, directory name, or volume label syntax is incorrect.
The command is being issued to a bash shell that is opened over ssh. I really
don't know why it was decided to use cmd.exe to launch mkdir instead of just
using mkdir through bash, but that's how the VCL code currently is. The
command is in a utility function that can be passed various paths to create.
In the case listed above, the escaped quotes wouldn't be needed. However, if
the path passed in contained any spaces, the quotes become necessary.
I chatted with jturney and avih on IRC about this (thanks jturney and avih!).
jturney pointed out using echo instead of mkdir also illustrated the problem.
in 3.1.4:
$ cmd.exe /c "echo \"C:/Cygwin/home/root/VCL\""
"C:/Cygwin/home/root/VCL"
in 3.1.5:
$ cmd.exe /c "echo \"C:/Cygwin/home/root/VCL\""
\"C:/Cygwin/home/root/VCL\"
And, this can be simplified even more to just
3.1.4:
$ cmd.exe /c "echo \""
"
3.1.5:
$ cmd.exe /c "echo \""
\"
avih brought up a valid point that it may now be quoting the quotes since they
are part of the argument list. However, I can't come up with the proper
escaping of things to use mkdir to create a directory with a space in it with
the new behavior.
jturney asked if I would email this list about the issue.
Thanks for any help!
Josh Thompson
- --
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University
my GPG/PGP key can be found on pool.sks-keyservers.net
All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.
-----BEGIN PGP SIGNATURE-----
iF0EARECAB0WIQRMIdRtWXideTZDK31X8tBw1209AwUCXuegCAAKCRBX8tBw1209
A09tAJ0f2c3/9LaHdYxbprt6IRem8i90ogCfeUNV0SQJFKfIMo8klnr+EiX+oNE=
=Dzm0
-----END PGP SIGNATURE-----
next reply other threads:[~2020-06-15 16:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 16:21 Josh Thompson [this message]
2020-06-22 20:11 ` Ken Brown
2020-06-24 17:26 ` Josh Thompson
2020-07-06 11:22 ` Corinna Vinschen
2020-07-06 14:14 ` Josh Thompson
2020-07-06 18:15 ` Corinna Vinschen
2020-07-21 16:45 ` Josh Thompson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3394273.JRUgpOGd2y@dvr \
--to=josh_thompson@ncsu.edu \
--cc=cygwin@cygwin.com \
--cc=dev@vcl.apache.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).