Skip to content

Commit eaf67dc

Browse files
committed
Exec plugin now executes the command in sh -c, allowing us to do some shell tricks etc (pipes, for example).
1 parent e467020 commit eaf67dc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

plugins/exec.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ def command_exec(self, args):
2222
self.core.command_help('exec')
2323
return
2424
try:
25-
cut_command = shlex.split(command)
26-
except Exception as e:
27-
self.core.information('Failed to parse command: %s' % (e,), 'Error')
28-
return
29-
try:
30-
process = subprocess.Popen(cut_command, stdout=subprocess.PIPE)
25+
process = subprocess.Popen(['sh', '-c', command], stdout=subprocess.PIPE)
3126
except OSError as e:
3227
self.core.information('Failed to execute command: %s' % (e,), 'Error')
3328
return

0 commit comments

Comments
 (0)