Skip to content

fix: execute installed CLI entrypoint - #22

Merged
rogerchappel merged 1 commit into
mainfrom
agent/oss-135-fix-bin-entrypoint
Jul 22, 2026
Merged

fix: execute installed CLI entrypoint#22
rogerchappel merged 1 commit into
mainfrom
agent/oss-135-fix-bin-entrypoint

Conversation

@rogerchappel

Copy link
Copy Markdown
Owner

Summary

  • Resolve the CLI module and process.argv[1] through their real paths so npm's .bin symlink is recognized as the executable entrypoint.
  • Treat a missing or unresolvable argv path as an import, keeping the package safe to load without invoking the CLI.
  • Add a packed-install regression test covering --version, the default plan command, and side-effect-free import behavior.

Verification

  • Tests or checks run: node --test test/cli.test.js; bash scripts/validate.sh; npm run release:check; git diff --check
  • Manual review completed: reproduced the current packed binary returning no stdout before the fix and confirmed the packed binary returns 0.1.0 plus a non-empty one-file plan after the fix.

Risk Level

  • Low
  • Medium
  • High

Notes: The change is limited to executable-entrypoint detection and one packed-install regression test. Public exports and CLI behavior are unchanged.

Rollback Plan

  • Revert commit 92c3305 to restore the previous URL equality check and remove the regression test.

Human Decision Needed

  • None
  • Maintainer review
  • Product/design decision
  • Security/privacy review
  • Other:

@rogerchappel
rogerchappel merged commit a83b602 into main Jul 22, 2026
1 check passed
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