You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a generic binary version manager. Everything works decently well, but I recently ran into trouble with how this package generates powershell shims expecting node.exe on the path for Windows (in my case, only node.cmd and node.ps1 exist on the path).
The cmd shim seems fine and it will fallback to using node instead of node.exe when node.exe doesn't exist (you may categorize this difference between cmd and powershell as a bug).
Current Behavior
Example of yarn's script:
#!/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=0if (Test-Path"$basedir/node$exe") {
&"$basedir/node$exe""$basedir/node_modules/yarn/bin/yarn.js"$args$ret=$LASTEXITCODE
} else {
&"node$exe""$basedir/node_modules/yarn/bin/yarn.js"$args$ret=$LASTEXITCODE
}
exit$ret
Expected Behavior
It would do Test-Path for .exe and if that doesn't exist, then it would fallback to not providing a .exe file extension.
Thanks!
The text was updated successfully, but these errors were encountered:
What / Why
I'm working on a generic binary version manager.Everything works decently well, but I recently ran into trouble with how this package generates powershell shims expectingnode.exe
on the path for Windows (in my case, onlynode.cmd
andnode.ps1
exist on the path).The cmd shim seems fine and it will fallback to using
node
instead ofnode.exe
whennode.exe
doesn't exist (you may categorize this difference between cmd and powershell as a bug).Current Behavior
Example of yarn's script:
Expected Behavior
It would do Test-Path for
.exe
and if that doesn't exist, then it would fallback to not providing a.exe
file extension.Thanks!
The text was updated successfully, but these errors were encountered: