mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
WIP
This commit is contained in:
parent
fa4c46c23d
commit
f400c5576a
12 changed files with 59 additions and 213 deletions
|
|
@ -71,26 +71,10 @@ function pip3() {
|
|||
|
||||
# `python -m pip`, `python -m pip3`.
|
||||
function python() {
|
||||
if [[ "$1" == "-m" && "$2" == pip* ]]; then
|
||||
local mod="$2"
|
||||
shift 2
|
||||
if [[ "$mod" == "pip3" ]]; then
|
||||
wrapSafeChainCommand "pip3" "aikido-pip3" "$@"
|
||||
else
|
||||
wrapSafeChainCommand "pip" "aikido-pip" "$@"
|
||||
fi
|
||||
else
|
||||
command python "$@"
|
||||
fi
|
||||
wrapSafeChainCommand "python" "aikido-python" "$@"
|
||||
}
|
||||
|
||||
# `python3 -m pip`, `python3 -m pip3'.
|
||||
function python3() {
|
||||
if [[ "$1" == "-m" && "$2" == pip* ]]; then
|
||||
shift 2
|
||||
# python3 always uses pip3, regardless of whether user types `pip` or `pip3`
|
||||
wrapSafeChainCommand "pip3" "aikido-pip3" "$@"
|
||||
else
|
||||
command python3 "$@"
|
||||
fi
|
||||
wrapSafeChainCommand "python3" "aikido-python3" "$@"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue