Skip to content

fix(cli): support single --entry flag - #1418

Open
Dextheking1 wants to merge 2 commits into
egoist:mainfrom
Dextheking1:fix/cli-single-entry-flag
Open

Dextheking1 wants to merge 2 commits into
egoist:mainfrom
Dextheking1:fix/cli-single-entry-flag

Conversation

@Dextheking1

@Dextheking1 Dextheking1 commented Sep 24, 2026 •

Copy link
Copy Markdown

Fixes #1322.

When --entry is used only once, cac returns a plain string instead of an array, and normalizeOptions then treated the string as an entry-alias map, Object.keys("index.ts") produced ["0","1",…], so the build failed with the cryptic Cannot find 0: i.

This normalizes a single --entry value into an array in the CLI action handler, before the positional-files fallback. Repeated --entry (array) and --entry.alias <file> (object) behavior is unchanged.

Regression test: single --entry flag builds instead of failing with "Cannot find 0" in test/index.test.ts (fails on main, passes with the fix). Full test/index.test.ts suite: 49/49 green.

@codesandbox

codesandbox Bot commented Sep 24, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web Editor • VS Code • Insiders

Open Preview

@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

@Dextheking1 is attempting to deploy a commit to the EGOIST's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Dextheking1
Dextheking1 marked this pull request as ready for review September 24, 2026 20:27
@Dextheking1

Copy link
Copy Markdown
Author

Could a maintainer authorize the pending Vercel preview deployment? It is stuck on 'Authorization required' and I cannot approve it as an outside contributor.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

Using --entry flag once fails with a cryptic error

1 participant