zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
114 stars 87 forks source link

Installing a Plug-in should not pass the plugin scoped registry as global registry on the NPM install command #2317

Open awharn opened 2 hours ago

awharn commented 2 hours ago

Describe the bug

When:

Zowe CLI appends --registry https://zowe.jfrog.io/artifactory/api/npm/npm-local-release/ to the npm install command run behind the scenes. Since that registry might not contain certain packages such as zos-node-accessor@2.0.11, the installation might fail. The scoped registry should not be passed through as a global registry.

https://github.com/zowe/zowe-cli/blob/027d9cc151dd07e5a5a1d236ed47694f68391ee3/packages/imperative/src/imperative/src/plugins/cmd/install/install.handler.ts#L76-L96 https://github.com/zowe/zowe-cli/blob/027d9cc151dd07e5a5a1d236ed47694f68391ee3/packages/imperative/src/imperative/src/plugins/cmd/install/install.handler.ts#L220-L244 https://github.com/zowe/zowe-cli/blob/027d9cc151dd07e5a5a1d236ed47694f68391ee3/packages/imperative/src/imperative/src/plugins/utilities/npm-interface/install.ts#L125 https://github.com/zowe/zowe-cli/blob/027d9cc151dd07e5a5a1d236ed47694f68391ee3/packages/imperative/src/imperative/src/plugins/utilities/NpmFunctions.ts#L60-L62

github-actions[bot] commented 2 hours ago

Thank you for creating a bug report. We will investigate the bug and evaluate its impact on the product. If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.