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

Use local ui5 cli module over globally installed one #296

Closed
1 of 6 tasks
RandomByte opened this issue Oct 1, 2018 · 0 comments
Closed
1 of 6 tasks

Use local ui5 cli module over globally installed one #296

RandomByte opened this issue Oct 1, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request module/ui5-cli Related to the UI5 CLI module

Comments

@RandomByte
Copy link
Member

Expected Behavior

When executing ui5 --version in a project that has a version of the UI5 CLI installed in it's node_modules directory (e.g. because of a (dev)dependency to @ui5/cli), that module shall be used over any globally installed version of the UI5 CLI. Even if the ui5 command technically invokes the global module.

Current Behavior

When the UI5 CLI is installed locally in a project as well as globally, depending on how it is getting invoked, a user might end up using an unexpected version (if two different versions have been installed).

Steps to reproduce the issue

  1. Install the latest UI5 CLI globally: npm install --global @ui5/cli
  2. Inside a project with a package.json, install an old version of the CLI: npm install --global @ui5/cli@0.1.0
  3. Create an npm script for ui5 --version to the package.json
  4. Execute ui5 --version directly and through the npm script
  5. Observe the different versions.

Context

  • OS/Platform: macOS
  • Node.js Version: v10.5.0
  • npm Version: 6.4.1

Affected components

@matz3 matz3 self-assigned this Oct 1, 2018
matz3 referenced this issue in SAP/ui5-cli Oct 1, 2018
When running the global "ui5" command while a local @ui5/cli version is
installed for the current project, the local one should be preferred.

Fixes: #58
matz3 referenced this issue in SAP/ui5-cli Oct 1, 2018
When running the global "ui5" command while a local @ui5/cli version is
installed for the current project, the local one should be preferred.

Fixes: #58
RandomByte referenced this issue in SAP/ui5-cli Oct 15, 2018
When running the global "ui5" command while a local @ui5/cli version is
installed for the current project, the local one should be preferred.

Fixes: #58
RandomByte referenced this issue in SAP/ui5-cli Oct 16, 2018
When running the global "ui5" command while a local @ui5/cli version is
installed for the current project, the local one should be preferred.

Fixes: #58
matz3 referenced this issue in SAP/ui5-cli Nov 15, 2018
When running the global "ui5" command while a local @ui5/cli version is
installed for the current project, the local one should be preferred.
In this case an information will be logged to the console.

This can be disabled by setting an environment variable:
`UI5_CLI_NO_LOCAL=true`

`ui5 --version` now also displays the CLI location for better troubleshooting.

Fixes: #58
@RandomByte RandomByte transferred this issue from SAP/ui5-cli Nov 19, 2020
@RandomByte RandomByte added enhancement New feature or request module/ui5-cli Related to the UI5 CLI module labels Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module/ui5-cli Related to the UI5 CLI module
Projects
None yet
Development

No branches or pull requests

2 participants