1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`create a command shim for a .exe file 1`] = `
"#!/bin/sh
basedir=$(dirname \\"$(echo \\"$0\\" | sed -e 's,\\\\\\\\,/,g')\\")
case \`uname\` in
*CYGWIN*) basedir=\`cygpath -w \\"$basedir\\"\`;;
esac
\\"$basedir/foo\\" \\"$@\\"
exit $?
"
`;
exports[`create a command shim for a .exe file 2`] = `
"@SETLOCAL
@\\"%~dp0\\\\foo\\" %*
"
`;
exports[`create a command shim for a .exe file 3`] = `
"#!/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\\"
}
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & \\"$basedir/foo\\" $args
} else {
& \\"$basedir/foo\\" $args
}
exit $LASTEXITCODE
"
`;
|