12345678910111213141516171819202122232425262728 |
- #!/usr/bin/env pwsh
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
- $exe=""
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-
-
- $exe=".exe"
- }
- $ret=0
- if (Test-Path "$basedir/node$exe") {
-
- if ($MyInvocation.ExpectingInput) {
- $input | & "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
- } else {
- & "$basedir/node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
- }
- $ret=$LASTEXITCODE
- } else {
-
- if ($MyInvocation.ExpectingInput) {
- $input | & "node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
- } else {
- & "node$exe" "$basedir/../cross-env/src/bin/cross-env.js" $args
- }
- $ret=$LASTEXITCODE
- }
- exit $ret
|