careful_rm
careful_rm copied to clipboard
check_output calls run with invalid get param
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.