mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Adapt per review
This commit is contained in:
parent
9dacf5cff3
commit
190607de92
27 changed files with 191 additions and 114 deletions
|
|
@ -46,8 +46,7 @@ function createUnixShims(shimsDir) {
|
|||
|
||||
const template = fs.readFileSync(templatePath, "utf-8");
|
||||
|
||||
// Create a shim for each tool except pip for now.
|
||||
// TODO(pip): Enable pip and pip3 CI support
|
||||
// Create a shim for each tool except pip (CI support not yet implemented)
|
||||
let created = 0;
|
||||
for (const toolInfo of knownAikidoTools) {
|
||||
if (toolInfo.tool === "pip") {
|
||||
|
|
@ -89,8 +88,7 @@ function createWindowsShims(shimsDir) {
|
|||
|
||||
const template = fs.readFileSync(templatePath, "utf-8");
|
||||
|
||||
// Create a shim for each tool except pip for now.
|
||||
// TODO(pip): Enable pip and pip3 CI support
|
||||
// Create a shim for each tool except pip (CI support not yet implemented)
|
||||
let created = 0;
|
||||
for (const toolInfo of knownAikidoTools) {
|
||||
if (toolInfo.tool === "pip") {
|
||||
|
|
|
|||
|
|
@ -70,11 +70,9 @@ function npm
|
|||
end
|
||||
|
||||
function pip
|
||||
# Default to Python 2 major version when explicitly calling pip
|
||||
wrapSafeChainCommand "pip" "aikido-pip" --target-version-major "2" $argv
|
||||
wrapSafeChainCommand "pip" "aikido-pip" $argv
|
||||
end
|
||||
|
||||
function pip3
|
||||
# Route to Python 3 when calling pip3
|
||||
wrapSafeChainCommand "pip3" "aikido-pip" --target-version-major "3" $argv
|
||||
wrapSafeChainCommand "pip3" "aikido-pip3" $argv
|
||||
end
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@ function npm() {
|
|||
}
|
||||
|
||||
function pip() {
|
||||
wrapSafeChainCommand "pip" "aikido-pip" --target-version-major "2" "$@"
|
||||
wrapSafeChainCommand "pip" "aikido-pip" "$@"
|
||||
}
|
||||
|
||||
function pip3() {
|
||||
wrapSafeChainCommand "pip3" "aikido-pip" --target-version-major "3" "$@"
|
||||
wrapSafeChainCommand "pip3" "aikido-pip3" "$@"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,13 +88,9 @@ function npm {
|
|||
}
|
||||
|
||||
function pip {
|
||||
# Default to Python 2 major version when explicitly calling pip
|
||||
$forward = @("--target-version-major", "2") + $args
|
||||
Invoke-WrappedCommand "pip" "aikido-pip" $forward
|
||||
Invoke-WrappedCommand "pip" "aikido-pip" $args
|
||||
}
|
||||
|
||||
function pip3 {
|
||||
# Route to Python 3 when calling pip3
|
||||
$forward = @("--target-version-major", "3") + $args
|
||||
Invoke-WrappedCommand "pip3" "aikido-pip" $forward
|
||||
Invoke-WrappedCommand "pip3" "aikido-pip3" $args
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue