Project

General

Profile

Actions

Bug #5131

closed

[Crunch] run-command passes escape backslashes through

Added by Brett Smith about 9 years ago. Updated about 9 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 #1

Updated by Brett Smith about 9 years ago

  • Description updated (diff)
Actions #2

Updated by Brett Smith about 9 years ago

  • Status changed from New to In Progress
  • Assigned To set to Brett Smith
Actions #3

Updated by Brett Smith about 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:906aa5e3427c1e89e5f426191e33af4b1c27fc7e.

Actions

Also available in: Atom PDF