Project

General

Profile

Actions

Bug #5131

closed

[Crunch] run-command passes escape backslashes through

Added by Brett Smith almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Crunch
Target version:
Story points:
0.5

Description

run-command lets you prefix characters with a backslash to prevent it from interpreting them. However, when you do this, it leaves the backslash in the original string. This can leave you in situations where there's no way to write a command that works as intended. For example, here's a user's command parameter:

["bash", "-c", "(vcf-merge \\$(ls -1 *.vcf.gz | perl -pe 's/\\n/ /g') > merge.vcf)"]

If you remove the backslashes before the $, run-command tries to interpret the subcommand. With the backslashes in, however, they get passed to bash, so bash dies with a syntax error.

run-command should "consume" escape backslashes.


Subtasks 1 (0 open1 closed)

Task #5132: Review 5131-run-command-consume-backslashes-wipResolvedPeter Amstutz02/03/2015Actions
Actions

Also available in: Atom PDF