Skip to content

Fix init package manager detection and incomplete setup reporting - #276

Merged
developersdigest merged 2 commits into
mainfrom
fix/init-package-manager-reporting
Sep 22, 2026
Merged

developersdigest merged 2 commits into
mainfrom
fix/init-package-manager-reporting

Conversation

@developersdigest

@developersdigest developersdigest commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

When init --all runs through bunx or pnpm, global installation now uses the detected package manager instead of always invoking npm. Setup checks the selected manager version before installing and rejects obsolete npm with a diagnostic rather than suggesting sudo.

Failed global installation preserves completed authentication and skill setup, reports incomplete setup, and exits with code 1. Retry commands, global-bin guidance, and next-step commands use the selected package manager. Skipped or failed skill installs no longer produce an unconditional success summary.

Validation: build and formatting passed; all 609 tests passed with an isolated home directory. Six built-CLI subprocess checks with stub npm/pnpm/Bun executables verified install selection, obsolete npm rejection, and failure exit codes. These six checks did not perform real installs; subsequent real install validation is detailed below. No package was published.

Real package-manager validation (packed branch build, isolated HOME/global directories, authentication and skills skipped):

  • npm exec → npm 11.12.1: init exited 0; global executable runs (1.24.3).
  • pnpm dlx → pnpm 11.4.0: init exited 0; global executable runs (registry resolution installed 1.23.3).
  • bunx → Bun 1.3.14: init exited 0; global executable runs (1.24.3).
  • A real pnpm run without its global bin directory on PATH exited 1, reported incomplete setup, and printed pnpm setup guidance plus pnpm dlx fallback commands.

The real runs used the packed modified CLI to execute init; global installs fetched the package manager’s registry-selected release. No package was published.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Shadow auto-approve: would not auto-approve because issues were found.
Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread src/commands/init.ts Outdated
Comment thread src/commands/init.ts Outdated
Comment thread src/__tests__/utils/package-manager.test.ts
Comment thread src/__tests__/commands/init.test.ts
Comment thread src/utils/package-manager.ts Outdated
Comment thread src/utils/package-manager.ts Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

0 issues found across 4 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would auto-approve. Fixes init's package manager detection and incomplete setup reporting: global installs now use the detected manager, failures preserve completed setup and exit 1, and next-step commands reflect the manager. Adds detection utility and tests; bounded to the init command and clearly beneficial.

Re-trigger cubic

@developersdigest
developersdigest merged commit 931755a into main Sep 22, 2026
8 checks passed
@developersdigest
developersdigest deleted the fix/init-package-manager-reporting branch September 22, 2026 17:36
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.

1 participant