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

Support flags for astro add #8032

Merged
merged 5 commits into from
Aug 14, 2023
Merged

Support flags for astro add #8032

merged 5 commits into from
Aug 14, 2023

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Aug 10, 2023

Changes

Testing

Tested manually, it works!

Docs

Probably don't need to document this

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Aug 10, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

🦋 Changeset detected

Latest commit: c763daf

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

🦋 Changeset detected

Latest commit: 40d6322

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines +637 to +644
// Allow forwarding of standard `npm install` flags
// See https://docs.npmjs.com/cli/v8/commands/npm-install#description
const INHERITED_FLAGS = new Set<string>([
"P", "save-prod",
"D", "save-dev",
"E", "save-exact",
"no-save",
])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scoped these commands down to a hard-coded list!

spinner.fail();
debug('add', 'Error installing dependencies', err);
console.error('\n', (err as any).stdout, '\n');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an error log here since the installation step can fail silently.

@natemoo-re natemoo-re merged commit 3e46634 into main Aug 14, 2023
13 checks passed
@natemoo-re natemoo-re deleted the feat/add-flags branch August 14, 2023 15:50
This was referenced Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

astro add cli doesn't inherit flags
4 participants