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

CLI installer overwrites existing credentials #7120

Open
thorstenfriesen opened this issue Apr 22, 2024 · 0 comments
Open

CLI installer overwrites existing credentials #7120

thorstenfriesen opened this issue Apr 22, 2024 · 0 comments

Comments

@thorstenfriesen
Copy link

thorstenfriesen commented Apr 22, 2024

Environment

Operating System: Mac OS
Node Version: 16
Magento2

Reproduction

  1. Ensure that the ~/.composer/auth.json file already contains Magento credentials or other credentials.
  2. Proceed with the installation process of Vue Storefront using the CLI installer.
  3. Observe that the existing credentials in ~/.composer/auth.json have been overwritten by the new ones.

Describe the bug

Problem:
The CLI installer for Vue Storefront asks for Magento credentials during the installation process and overwrites all existing credentials in the ~/.composer/auth.json file. This can cause unintended side effects for developers managing multiple Magento instances or other dependencies via Composer.

Expected Behavior:
The installer should not overwrite existing credentials in ~/.composer/auth.json. Instead, it should append new credentials or use them only for the current installation without altering the file.

Current Behavior:
Entering Magento credentials in the CLI installer results in all previous entries in ~/.composer/auth.json (http-basic) being replaced.

Additional context

Code Reference:
https://github.com/vuestorefront/vue-storefront/blob/269f980e8597dd324bd315683011932ff8325440/packages/cli/src/domains/generate/magento2/prompts/handleMagentoKeys.ts#L50C7-L50C33

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant