Skip to content

Fix git unlock on newer Node runtimes#2

Open
higgins wants to merge 1 commit into
mainfrom
codex/fix-repository-cloning-bug
Open

Fix git unlock on newer Node runtimes#2
higgins wants to merge 1 commit into
mainfrom
codex/fix-repository-cloning-bug

Conversation

@higgins

@higgins higgins commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Newer Node runtimes reject non-numeric values passed to process.exit, which caused boolean exit codes to throw and break git clean/smudge filters during clone/unlock workflows.
  • Add a regression test to ensure unlocking a cloned repo with an exported key transparently decrypts protected heredocs and to prevent future regressions.

Description

  • Replace process.exit(!!msg) with a numeric exit code using process.exit(msg ? 1 : 0) to avoid passing a boolean to process.exit.
  • Add an end-to-end regression test test/git-unlock-regression.sh that initializes a repo, commits an encrypted file, clones it, runs git-unlock with the exported key, and verifies decryption.
  • Wire npm test to run the new regression script by updating the test script in package.json to bash test/git-unlock-regression.sh.

Testing

  • Ran npm test which runs test/git-unlock-regression.sh, and the test completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant