Skip to content

Command can't have \n #175

@fenuks

Description

@fenuks

exec hang when executing command with /n. Its probably because wrong escaping.
E.g. this will hang:

syncExec = require('shelljs').exec
var command = "python2 -c 'print \"first line\"\nprint \"second line\"'"
out = syncExec(command2)

Child_process.exec works just fine.

Metadata

Metadata

Assignees

Labels

execIssues specific to the shell.exec() APIfixBug/defect, or a fix for such a problem

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions