Skip to content

fix(create-astro): error when --add and --no-install are used together#15350

Merged
matthewp merged 1 commit intonextfrom
create-astro-conflict-flags
Jan 30, 2026
Merged

fix(create-astro): error when --add and --no-install are used together#15350
matthewp merged 1 commit intonextfrom
create-astro-conflict-flags

Conversation

@matthewp
Copy link
Copy Markdown
Contributor

Changes

  • Adds validation that errors early when --add and --no-install flags are used together
  • Previously, --add was silently ignored when --no-install was set, leading to confusing behavior (e.g., --add cloudflare wouldn't create wrangler.jsonc)
  • Now users get a clear error message: "The --add flag requires dependencies to be installed. Remove --no-install or run `astro add` manually after installation."

Testing

Added a test case in packages/create-astro/test/context.test.js that verifies the process exits with code 1 when both flags are used together.

Docs

No docs changes needed - this is a bug fix that adds a clear error message for an invalid flag combination that was previously silently failing.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 30, 2026

🦋 Changeset detected

Latest commit: 989754c

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

@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Jan 30, 2026
Copy link
Copy Markdown
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Great quick win

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
eslint-plugin-regexp trusted-with-provenance none
@cloudflare/kv-asset-handler trusted-with-provenance none
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
@sveltejs/vite-plugin-svelte-inspector trusted-with-provenance provenance
@sveltejs/vite-plugin-svelte trusted-with-provenance provenance
jsdoc-type-pratt-parser trusted-with-provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

Copy link
Copy Markdown
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Copy Markdown
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

@matthewp matthewp merged commit d758b68 into next Jan 30, 2026
22 checks passed
@matthewp matthewp deleted the create-astro-conflict-flags branch January 30, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: create-astro Related to the `create-astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants