Shims created for .cmd and .bat files don't call cmd.exe with the required flags to actually run the script. To run a script, the script path needs to be preceded with the /C (or /K) flags. I have attached a sample batch file shim generated by pnpm, but the issue also affects the PowerShell and shell scripts.
@SETLOCAL
@IF EXIST "%~dp0\cmd.exe" (
"%~dp0\cmd.exe" "%~dp0\global\5\node_modules\sass-embedded-win32-x64\dart-sass\sass.bat" %*
) ELSE (
@SET PATHEXT=%PATHEXT:;.JS;=;%
cmd "%~dp0\global\5\node_modules\sass-embedded-win32-x64\dart-sass\sass.bat" %*
)
The cmd call in line 6 (as well as line 3) above needs to include the /C flag, as below:
cmd /C "%~dp0\global\5\node_modules\sass-embedded-win32-x64\dart-sass\sass.bat" %*
Shims created for
.cmdand.batfiles don't callcmd.exewith the required flags to actually run the script. To run a script, the script path needs to be preceded with the/C(or/K) flags. I have attached a sample batch file shim generated by pnpm, but the issue also affects the PowerShell and shell scripts.The
cmdcall in line 6 (as well as line 3) above needs to include the/Cflag, as below: