diff options
author | Minteck <contact@minteck.org> | 2022-01-21 14:39:46 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-21 14:39:46 +0100 |
commit | 3a04cb197f152f171fba679663a91a9bb61d710e (patch) | |
tree | 825d8f9b0daab3e434d85704144ca87492da9b92 /node_modules/.bin/jake.ps1 | |
parent | c2aa7bf38fb30de2d04f87f8e7780e4c768ae6b1 (diff) | |
download | cobalt-3a04cb197f152f171fba679663a91a9bb61d710e.tar.gz cobalt-3a04cb197f152f171fba679663a91a9bb61d710e.tar.bz2 cobalt-3a04cb197f152f171fba679663a91a9bb61d710e.zip |
Add config management
Diffstat (limited to 'node_modules/.bin/jake.ps1')
-rw-r--r-- | node_modules/.bin/jake.ps1 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/.bin/jake.ps1 b/node_modules/.bin/jake.ps1 new file mode 100644 index 0000000..d86e1bd --- /dev/null +++ b/node_modules/.bin/jake.ps1 @@ -0,0 +1,28 @@ +#!/usr/bin/env pwsh +$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent + +$exe="" +if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { + # Fix case when both the Windows and Linux builds of Node + # are installed in the same directory + $exe=".exe" +} +$ret=0 +if (Test-Path "$basedir/node$exe") { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args + } else { + & "$basedir/node$exe" "$basedir/../jake/bin/cli.js" $args + } + $ret=$LASTEXITCODE +} else { + # Support pipeline input + if ($MyInvocation.ExpectingInput) { + $input | & "node$exe" "$basedir/../jake/bin/cli.js" $args + } else { + & "node$exe" "$basedir/../jake/bin/cli.js" $args + } + $ret=$LASTEXITCODE +} +exit $ret |