Bug in quote-stripping for ACL and CCL in ASDF:RUN-SHELL-COMMAND

Bug #853566 reported by Robert P. Goldman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Low
Faré

Bug Description

ASDF mistakenly strips out quotes nested inside shell command strings in RUN-SHELL-COMMAND. The following three examples make this clear:

1. ACL with embedded double-quotes:

CL-USER(3): (let ((asdf::*verbose-out* *standard-output*))
             (asdf:run-shell-command "echo \"Writing to standard output.\""))
; $ echo "Writing to standard output."

; Writing

0

[looks like we also add an extra newline in ASDF-MESSAGE, but that's not a huge problem...]

2. By comparison, embedded single quotes work properly:

CL-USER(2): (let ((asdf::*verbose-out* *standard-output*))
             (asdf:run-shell-command "echo 'Writing to standard output.'"))
; $ echo 'Writing to standard output.'

; Writing to standard output.

0

3. And embedded double quotes work properly on SBCL:

CL-USER(1): (let ((asdf::*verbose-out* *standard-output*))
             (asdf:run-shell-command "echo \"Writing to standard output.\""))
; $ echo "Writing to standard output."
Writing to standard output.
0

[interestingly, no extra newlines in here, either]

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I have just verified that CCL has the same problem, which is not surprising, since on CCL as well as ACL, the command is passed as a separate argument, using -c, to the shell.

summary: - Bug in quote-stripping for ACL in ASDF:RUN-SHELL-COMMAND
+ Bug in quote-stripping for ACL and CCL in ASDF:RUN-SHELL-COMMAND
Revision history for this message
Faré (fahree) wrote :

In 2.017.11, I fixed this issue for ACL on Unix.

On Windows, the situation is quite desperate for either ACL or CCL, unless there's a complete rewrite or run-program. I disrecommend using asdf:run-shell-command on Windows, or in any program that aims to be portable beyond a Unix environment (including cygwin).

In 2.017.11, I declare asdf:run-shell-command obsolete, and I recommend the only alternative I know that is portable to all ASDF-supported implementations and operating systems including Windows (excluding Genera), xcvb-driver:run-program/process-output-stream (that happen to have written).

I'm marking this bug as "fixed", since it is probably as fixed as it ever will be (see recent discussion on asdf-devel). Please reopen or open a new bug if you consider the situation not acceptable.

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → Low
milestone: none → version2.1
status: New → Fix Committed
Revision history for this message
Faré (fahree) wrote :

Was released in 2.018

Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.