Skip to content

Commit

Permalink
fix: running new npm scripts in internal terminal (#2082)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor4312 authored Sep 18, 2024
1 parent 7dbdd01 commit caaec51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
- feat: improve display of HTML elements in the debugger
- feat: add node tool picker completion for launch.json ([#1997](https://github.com/microsoft/vscode-js-debug/issues/1997))
- fix: process attachment with `--inspect=:1234` style ([#2063](https://github.com/microsoft/vscode-js-debug/issues/2063))
- fix: running new npm scripts in internal terminal ([vscode#227285](https://github.com/microsoft/vscode/issues/227285))

## v1.93 (August 2024)

Expand Down
12 changes: 11 additions & 1 deletion src/targets/node/bootloader/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const checkProcessFilter = (env: IBootloaderInfo) => {
* session and cause us to think it's over before it actually is.
* @see https://github.com/microsoft/vscode-js-debug/issues/645
*/
export const checkNotNpmPrefixCheckOnWindows = () => {
const checkNotNpmPrefixCheckOnWindows = () => {
const argv = process.argv;
return !(
argv.length === 4
Expand All @@ -78,6 +78,15 @@ export const checkNotNpmPrefixCheckOnWindows = () => {
);
};

/**
* Similar as above for more recent versions of npm
* @see https://github.com/microsoft/vscode-js-debug/issues/645
*/
const checkNotNpmPrefixCheckOnWindows2 = () => {
const argv = process.argv;
return !(argv.length === 2 && basename(argv[1]) === 'npm-prefix.js');
};

/**
* Disable attaching to the node-gyp tree, otherwise some checks it does fails
* since Node writes debugger information to stderr.
Expand All @@ -103,6 +112,7 @@ const allChecks = [
checkNotElectron,
checkProcessFilter,
checkNotNpmPrefixCheckOnWindows,
checkNotNpmPrefixCheckOnWindows2,
];

/**
Expand Down

0 comments on commit caaec51

Please sign in to comment.