Commit eaf67dc5 authored by louiz’'s avatar louiz’

Exec plugin now executes the command in sh -c, allowing us to do some shell...

Exec plugin now executes the command in sh -c, allowing us to do some shell tricks etc (pipes, for example).
parent e467020e
......@@ -22,12 +22,7 @@ class Plugin(BasePlugin):
self.core.command_help('exec')
return
try:
cut_command = shlex.split(command)
except Exception as e:
self.core.information('Failed to parse command: %s' % (e,), 'Error')
return
try:
process = subprocess.Popen(cut_command, stdout=subprocess.PIPE)
process = subprocess.Popen(['sh', '-c', command], stdout=subprocess.PIPE)
except OSError as e:
self.core.information('Failed to execute command: %s' % (e,), 'Error')
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment