amitt001 / delegator.py

Subprocesses for Humans 2.0.
MIT License
1.7k stars 92 forks source link

List-style commands ignore all but [0] element #58

Closed chris-greenlight closed 5 years ago

chris-greenlight commented 6 years ago

I would except cmd2 to work and cmd1 to fail.

Both run -- cmd1 running the whole command line, and cmd2 just its first list element (no "-ltr").

cmd1 = 'ls -ltr' cmd2 = ['ls', '-ltr']

print delegator.run(cmd1).out total 148 -rw-r--r-- 1 chris 1414874935 128653 Aug 22 14:12 dump.txt -rw-r--r-- 1 chris 1414874935 224 Aug 22 14:32 9655bd19-f3ab-4db0-b3bd-c9fa7f895b78 -rw-r--r-- 1 chris 1414874935 224 Aug 22 14:32 2c9165d7-5a14-4c09-b23f-7c21d2923466 ...

print delegator.run(cmd2).out dump.txt 9655bd19-f3ab-4db0-b3bd-c9fa7f895b78 2c9165d7-5a14-4c09-b23f-7c21d2923466 ...

delegator v0.10.0 in Python 2.7.15

ParthS007 commented 5 years ago

Closing due to inactivity :+1:

xrobin commented 4 years ago

Why was this issue closed? The bug is clearly still not fixed, I can trivially reproduce it with Python 3.6.