Repository navigation
Replace an existing release signature instead of failing - #67
Merged
Merged
Conversation
sign() deleted the previous .codepushrelease with rmdir, which only removes folders, so signing an already signed folder failed with ENOTDIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ashirman
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes REV-137.
Problem
sign()deletes a previous.codepushreleasebefore writing a new one, but it usedfs.rmdir, which only removes folders. Signing an already signed folder always failed withENOTDIR: not a directory, rmdir '…/.codepushrelease'.release-reactandrelease-expoempty the output folder before signing, so this didn't affect them today. It failed wheneversign()ran on a folder that was already signed.Fix
sign.ts: delete the file withfs.rm(signatureFilePath, { force: true }). The "Deleting previous release signature" log line and the access-rights error stay as they were.test/sign.ts, which signs with a freshly generated RSA key and checks the result with the public key:contentHashequalsgeneratePackageHashFromDirectoryfor the folder.ENOTDIRbefore the fix.Verification
tsc,npm run lintand Prettier are clean.🤖 Generated with Claude Code