Adapt per review

This commit is contained in:
Reinier Criel 2025-10-27 09:23:47 -07:00
parent 9dacf5cff3
commit 190607de92
27 changed files with 191 additions and 114 deletions

View file

@ -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") {

View file

@ -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

View file

@ -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" "$@"
}

View file

@ -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
}