Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: running new npm scripts in internal terminal #2082

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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