Skip to content

Commit caaec51

Browse files
authored
fix: running new npm scripts in internal terminal (#2082)
Fixes microsoft/vscode#227285
1 parent 7dbdd01 commit caaec51

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
77
- feat: improve display of HTML elements in the debugger
88
- feat: add node tool picker completion for launch.json ([#1997](https://github.com/microsoft/vscode-js-debug/issues/1997))
99
- fix: process attachment with `--inspect=:1234` style ([#2063](https://github.com/microsoft/vscode-js-debug/issues/2063))
10+
- fix: running new npm scripts in internal terminal ([vscode#227285](https://github.com/microsoft/vscode/issues/227285))
1011

1112
## v1.93 (August 2024)
1213

src/targets/node/bootloader/filters.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const checkProcessFilter = (env: IBootloaderInfo) => {
6868
* session and cause us to think it's over before it actually is.
6969
* @see https://github.com/microsoft/vscode-js-debug/issues/645
7070
*/
71-
export const checkNotNpmPrefixCheckOnWindows = () => {
71+
const checkNotNpmPrefixCheckOnWindows = () => {
7272
const argv = process.argv;
7373
return !(
7474
argv.length === 4
@@ -78,6 +78,15 @@ export const checkNotNpmPrefixCheckOnWindows = () => {
7878
);
7979
};
8080

81+
/**
82+
* Similar as above for more recent versions of npm
83+
* @see https://github.com/microsoft/vscode-js-debug/issues/645
84+
*/
85+
const checkNotNpmPrefixCheckOnWindows2 = () => {
86+
const argv = process.argv;
87+
return !(argv.length === 2 && basename(argv[1]) === 'npm-prefix.js');
88+
};
89+
8190
/**
8291
* Disable attaching to the node-gyp tree, otherwise some checks it does fails
8392
* since Node writes debugger information to stderr.
@@ -103,6 +112,7 @@ const allChecks = [
103112
checkNotElectron,
104113
checkProcessFilter,
105114
checkNotNpmPrefixCheckOnWindows,
115+
checkNotNpmPrefixCheckOnWindows2,
106116
];
107117

108118
/**

0 commit comments

Comments
 (0)