mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix issue seen during Windows testing
This commit is contained in:
parent
a438175e8a
commit
3c109fb5fd
1 changed files with 6 additions and 4 deletions
|
|
@ -99,8 +99,9 @@ function pip3 {
|
||||||
function python {
|
function python {
|
||||||
param([Parameter(ValueFromRemainingArguments=$true)]$Args)
|
param([Parameter(ValueFromRemainingArguments=$true)]$Args)
|
||||||
if ($Args.Length -ge 2 -and $Args[0] -eq '-m' -and $Args[1] -match '^pip(3)?$') {
|
if ($Args.Length -ge 2 -and $Args[0] -eq '-m' -and $Args[1] -match '^pip(3)?$') {
|
||||||
if ($Args[1] -eq 'pip3') { Invoke-WrappedCommand 'pip3' 'aikido-pip3' $Args[2..($Args.Length-1)] }
|
$pipArgs = if ($Args.Length -gt 2) { $Args | Select-Object -Skip 2 } else { @() }
|
||||||
else { Invoke-WrappedCommand 'pip' 'aikido-pip' $Args[2..($Args.Length-1)] }
|
if ($Args[1] -eq 'pip3') { Invoke-WrappedCommand 'pip3' 'aikido-pip3' $pipArgs }
|
||||||
|
else { Invoke-WrappedCommand 'pip' 'aikido-pip' $pipArgs }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Invoke-RealCommand 'python' $Args
|
Invoke-RealCommand 'python' $Args
|
||||||
|
|
@ -111,8 +112,9 @@ function python {
|
||||||
function python3 {
|
function python3 {
|
||||||
param([Parameter(ValueFromRemainingArguments=$true)]$Args)
|
param([Parameter(ValueFromRemainingArguments=$true)]$Args)
|
||||||
if ($Args.Length -ge 2 -and $Args[0] -eq '-m' -and $Args[1] -match '^pip(3)?$') {
|
if ($Args.Length -ge 2 -and $Args[0] -eq '-m' -and $Args[1] -match '^pip(3)?$') {
|
||||||
if ($Args[1] -eq 'pip3') { Invoke-WrappedCommand 'pip3' 'aikido-pip3' $Args[2..($Args.Length-1)] }
|
$pipArgs = if ($Args.Length -gt 2) { $Args | Select-Object -Skip 2 } else { @() }
|
||||||
else { Invoke-WrappedCommand 'pip' 'aikido-pip' $Args[2..($Args.Length-1)] }
|
if ($Args[1] -eq 'pip3') { Invoke-WrappedCommand 'pip3' 'aikido-pip3' $pipArgs }
|
||||||
|
else { Invoke-WrappedCommand 'pip' 'aikido-pip' $pipArgs }
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Invoke-RealCommand 'python3' $Args
|
Invoke-RealCommand 'python3' $Args
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue