We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import os import subprocess from plumbum.cmd import git cmd = git["log", "--format='oneline'"] print(str(cmd)) #$ /usr/bin/git log --format='oneline' os.system(str(cmd)) # works fine subprocess.call(str(cmd), shell=True) # works fine subprocess.call(str(cmd).split()) #$ fatal: invalid --pretty format: 'oneline' cmd() #$ Traceback (most recent call last): #$ File "git.py", line 27, in <module> #$ cmd() #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/commands/base.py", line 90, in __call__ #$ return self.run(args, **kwargs)[1] #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/commands/base.py", line 220, in run #$ return p.run() #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/commands/base.py", line 182, in runner #$ return run_proc(p, retcode, timeout) #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/commands/processes.py", line 206, in run_proc #$ return _check_process(proc, retcode, timeout, stdout, stderr) #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/commands/processes.py", line 23, in _check_process #$ proc.verify(retcode, timeout, stdout, stderr) #$ File "/home/xged/miniconda3/envs/git/lib/python3.5/site-packages/plumbum/machines/base.py", line 22, in verify #$ stdout, stderr) #$ plumbum.commands.processes.ProcessExecutionError: Command line: ['/usr/bin/git', 'log', "--format='oneline'"] #$ Exit code: 128 #$ Stderr: | fatal: invalid --pretty format: 'oneline'
The text was updated successfully, but these errors were encountered:
cmd = git["log", "--format=oneline"]
works. I think this has to do with Plumbum's auto quoting.
Sorry, something went wrong.
Eventually, I'll try to look at the quoting model and see if I can improve it. Thanks!
No branches or pull requests
The text was updated successfully, but these errors were encountered: