Skip to content

fix/remove executable bit#387

Merged
technophile-04 merged 2 commits intomainfrom
fix/remove-executable-bit
Jan 29, 2026
Merged

fix/remove executable bit#387
technophile-04 merged 2 commits intomainfrom
fix/remove-executable-bit

Conversation

@technophile-04
Copy link
Collaborator

@technophile-04 technophile-04 commented Jan 29, 2026

Description:

The reason we switched to using github api was #381

Why We Made This Change

The Problem

The GitHub Actions workflow using changesets/action@v1.5.3 was failing with this error:

Error: Unexpected executable file at bin/create-dapp-se2.js, GitHub API only supports non-executable files and directories.

Root Cause

The file bin/create-dapp-se2.js had executable permissions (100755 or -rwxr-xr-x). This is the Unix file mode that allows a file to be run directly like ./create-dapp-se2.js.

When the changesets action tries to create a Pull Request, it uses the GitHub API to commit files. However, the GitHub API has a limitation: it cannot create or update files with the executable bit set.

The Fix

We changed the file mode from 100755 (executable) to 100644 (non-executable):

mode change 100755 => 100644 bin/create-dapp-se2.js

Why This Doesn't Break Anything

You might wonder: "If it's a CLI binary, doesn't it need to be executable?"

The answer is no, for two reasons:

  1. npm handles permissions automatically - When someone installs your package via npm install -g create-eth or runs npx create-eth, npm reads the "bin" field in package.json and automatically sets the executable permission on the target system.

  2. Node runs it anyway - When you run node bin/create-dapp-se2.js or yarn cli, Node.js interprets the file directly. The executable bit is only needed if you want to run it as ./bin/create-dapp-se2.js without the node prefix.

Summary

Before After
File mode 100755 (executable) File mode 100644 (non-executable)
GitHub API rejects it GitHub API accepts it
Changesets action fails Changesets action works
CLI still works ✓ CLI still works ✓

Merging this and trying once

The changesets/action fails when executable files are present because
GitHub API only supports non-executable files. npm/yarn handles
executable permissions automatically during package installation.
@technophile-04 technophile-04 merged commit ef01a91 into main Jan 29, 2026
7 checks passed
@technophile-04 technophile-04 deleted the fix/remove-executable-bit branch January 29, 2026 17:38
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.

2 participants