mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-12-16 06:50:21 +00:00
On Unix, with shell=True, the shell default to /bin/sh. Using Popen(['type', command], shell=True) is equivalent to calling Popen(['/bin/sh', '-c', 'type', command]). In this case 'command' becomes a positional parameter to the shell, and not an argument to the command 'type'. The solution is to pass a single string as parameter. The problem is that with shell=True, we are never safe from a shell injection, so it is wiser to use a python only solution. The package distutils is part of the standard distribution, so it doesn't add extra dependencies. The method find_executable has the same behaviour as 'which' on bash. |
||
|---|---|---|
| .. | ||
| assets | ||
| fs | ||
| tasks | ||
| __init__.py | ||
| bytes.py | ||
| exceptions.py | ||
| fsm_proxy.py | ||
| minify_json.py | ||
| phases.py | ||
| releases.py | ||
| sectors.py | ||
| task_groups.py | ||
| tools.py | ||