The behavior is not caused by PowerShell and cannot change it .
cmd.exe - Powershell cmd cmd.exe .
:
, Node.js , node.exe PATH:
-, node.exe , Ctrl+C, .
PS> node -e "while (true);"
, Ctrl+C - .
, :
PS> "@echo off'nnode -e '"while (true);'"" | Set-Content test.cmd
PS> ./test.cmd
, Ctrl+C Terminate batch job (Y/N)? . ( , cmd.exe.)
, gulp cmd:
, gulp CLI.
Windows, gulp CLI gulp.cmd - . " " ( ) npm -package, JS .
gulp gulp.cmd :
PS C:\some\NodeJs\project> npx where gulp
- :
C:\some\NodeJs\project\node_modules\.bin\gulp
C:\some\NodeJs\project\node_modules\.bin\gulp.cmd
, where.exe Unix- , ...\gulp; , cmd.exe/Powershell , ...\gulp.cmd - .
( , , @set/p dummy="Press a key" gulp.cmd, , , gulp .cmd.
, gulp.exe.)
Windows node_modules\.bin CLI CLI, , :
node_modules\.bin\<some-cli> - Unix ( shebang).node_modules\.bin\<some-cli>.cmd - Windows.
:
npm , Windows PowerShell (*.ps1). npm, yarn . :
*.ps1 - PowerShell, , cmd.exe ( ).
PowerShell cmd.exe , Windows 10.
PowerShell *.ps1 , npm, *.ps1, *.cmd .