Skip to content
New issue

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

check_output calls run with invalid get param #14

Open
drcongo opened this issue Jul 24, 2018 · 0 comments
Open

check_output calls run with invalid get param #14

drcongo opened this issue Jul 24, 2018 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@drcongo
Copy link

drcongo commented Jul 24, 2018

Just tried installing this in Oh-My-Zsh on macOS 10.13.6 (17G65) but starting a new shell shows a Python stack trace...

  OSA = check_output('command -pv osascript', shell=True).strip()
File "/Users/andy/.oh-my-zsh/custom/plugins/careful_rm/careful_rm.py", line 163, in check_output
  _, stdout, _ = run(cmd, shell=shell, check=True, get=True)
File "/Users/andy/.oh-my-zsh/custom/plugins/careful_rm/careful_rm.py", line 130, in run
  'get must be one of {0} is {1}'.format(get_options, get)
ValueError: get must be one of ['all', 'stdout', 'stderr', 'code', None] is True```

Digging through the code, it looks like `check_output` is passing `get=True` to the run command: https://github.com/MikeDacre/careful_rm/blob/master/careful_rm.py#L161 which immediately raises the ValueError.

The output of `command -pv osascript` on my system is `/usr/bin/osascript` but I can't quite work out what we should be passing to run's `get` param, otherwise I'd have done a PR for you.
@MikeDacre MikeDacre self-assigned this Nov 1, 2018
@MikeDacre MikeDacre added the bug Something isn't working label Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants