aboutsummaryrefslogtreecommitdiff
path: root/node_modules/.bin/mime.ps1
diff options
context:
space:
mode:
authorgrant-kun <[email protected]>2022-09-26 07:14:29 -0500
committergrant-kun <[email protected]>2022-09-26 07:14:29 -0500
commit86feb9e6403cfa6198ffb6895877c1c00d2a738a (patch)
treecf29210132c5ffb2be80afe04eb0fa231dac3382 /node_modules/.bin/mime.ps1
parent47e3ae49258f9ddfb91b570745fedeaef4f0fc8f (diff)
update (not working)
Diffstat (limited to 'node_modules/.bin/mime.ps1')
-rw-r--r--node_modules/.bin/mime.ps128
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/.bin/mime.ps1 b/node_modules/.bin/mime.ps1
new file mode 100644
index 0000000..2222f40
--- /dev/null
+++ b/node_modules/.bin/mime.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/../mime/cli.js" $args
+ } else {
+ & "$basedir/node$exe" "$basedir/../mime/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+} else {
+ # Support pipeline input
+ if ($MyInvocation.ExpectingInput) {
+ $input | & "node$exe" "$basedir/../mime/cli.js" $args
+ } else {
+ & "node$exe" "$basedir/../mime/cli.js" $args
+ }
+ $ret=$LASTEXITCODE
+}
+exit $ret