fix(cli): add explicit --registry flag to npm publish command

Ensures npm publish uses the correct registry (registry.npmjs.org) even when
global npm config points to a mirror registry (e.g., registry.npmmirror.com).
This commit is contained in:
dongmucat 2026-05-06 17:00:03 +08:00
parent 0534d1d59a
commit cca6a64d43

View file

@ -142,7 +142,7 @@ EOF
log_stage "publishing package"
(
cd "$CLI_DIR"
NPM_CONFIG_USERCONFIG="$NPM_CONFIG_FILE" npm publish --access public
NPM_CONFIG_USERCONFIG="$NPM_CONFIG_FILE" npm publish --access public --registry "$NPM_REGISTRY"
)
log_stage "publish completed"