Skip to content

fix(installer): preserve executable mode on copy#1149

Open
EfeDurmaz16 wants to merge 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:efe/preserve-executable-mode
Open

fix(installer): preserve executable mode on copy#1149
EfeDurmaz16 wants to merge 1 commit into
vercel-labs:mainfrom
EfeDurmaz16:efe/preserve-executable-mode

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

Summary

Preserves executable permission bits when installing a skill in copy mode.

Copy-mode installs currently copy file contents but do not reapply the source file mode, which can turn executable helper scripts inside a skill into non-executable files after installation.

Changes

  • Reapply copied file permissions from the source file after cp completes.
  • Add a copy-mode regression test with an executable scripts/hello.sh fixture.

Validation

  • pnpm install --frozen-lockfile
  • pnpm format
  • pnpm test tests/installer-copy.test.ts
  • pnpm format:check

I also ran pnpm type-check, but it currently fails on existing unrelated errors in untouched files:

  • src/git.ts: simple-git options type does not include env
  • src/skills.ts: frontmatter metadata is inferred as {} / unknown

Closes #1140.

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.

[Bug]: copy mode strips +x mode bits from source files — installed shell scripts hit Permission denied

1 participant