fix: remove unused npm.setCmd method#7415
Merged
Merged
Conversation
wraithgar
reviewed
Apr 24, 2024
| const { exec = true } = await this.#load().then(r => r ?? {}) | ||
| return { | ||
| exec, | ||
| command: this.argv.shift(), |
Contributor
There was a problem hiding this comment.
Not to be solved here but this .shift() smells
wraithgar
approved these changes
Apr 24, 2024
Merged
This was referenced Apr 25, 2024
lukekarrys
added a commit
that referenced
this pull request
May 6, 2024
This PR refactors `exit-handler.js` to be a class so that it can more easily track its internal state. It uses this state to now fully distinguish between 3 states: npm never being set, npm not loaded, and exit handler never called. There are some new error messages shown via console.error if we know we are in an unexpected state. This also continues the refactoring started in #7415 to separate concerns between `npm` and `CLI`. Identifying the error message and logging it have been move to `npm` but catching that error and setting the `process.exitCode` are still handled in `exit-handler.js` and `cli/entry.js`. It also moves `command.cmdExec` to `npm` since it never called from within any `command` instance. This lets `npm` only ever call `command.exec` or `command.workspaceExec` now.
boyLenGit
pushed a commit
to boyLenGit/media-manager
that referenced
this pull request
May 25, 2026
npm 9/10 在 docker 内长期存在 'Exit handler never called' bug (npm/cli#7415, #6995),即使 exit code 0 也会导致依赖装不全。 改用 pnpm 9 (corepack 启用): - 内容寻址 + 全局 store,避免 hardlink 在 docker 沙盒里的 race - 自动从 package-lock.json 导入依赖关系 (pnpm import) - 在 GitHub Actions / GitLab CI 上稳定性远好于 npm - 等待 npm 11+ 修复后可以再切回去
boyLenGit
added a commit
to boyLenGit/media-manager
that referenced
this pull request
May 25, 2026
npm 9/10 在 docker 内长期存在 'Exit handler never called' bug (npm/cli#7415, #6995),即使 exit code 0 也会导致依赖装不全。 改用 pnpm 9 (corepack 启用): - 内容寻址 + 全局 store,避免 hardlink 在 docker 沙盒里的 race - 自动从 package-lock.json 导入依赖关系 (pnpm import) - 在 GitHub Actions / GitLab CI 上稳定性远好于 npm - 等待 npm 11+ 修复后可以再切回去
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.