Skip to content

fix: respect allowFileModifications setting in remove command#8

Merged
ctate merged 1 commit intomainfrom
fix/issue-6-1769438383340
Jan 26, 2026
Merged

fix: respect allowFileModifications setting in remove command#8
ctate merged 1 commit intomainfrom
fix/issue-6-1769438383340

Conversation

@ctate
Copy link
Copy Markdown
Collaborator

@ctate ctate commented Jan 26, 2026

Summary

The remove command was not respecting the allowFileModifications setting in opensrc/package.json, causing it to always update AGENTS.md even when file modifications were disabled. This fix aligns the remove command's behavior with the fetch command.

Changes

  • Added import for getFileModificationPermission from settings module
  • Added import for updatePackageIndex from agents module
  • Added permission check before updating AGENTS.md
  • When file modifications are disabled, only update the package index instead of AGENTS.md
  • Preserved existing console output behavior when file modifications are allowed

Fixes #6

## Summary

The remove command was not respecting the `allowFileModifications` setting in `opensrc/package.json`, causing it to always update AGENTS.md even when file modifications were disabled. This fix aligns the remove command's behavior with the fetch command.

## Changes

- Added import for `getFileModificationPermission` from settings module
- Added import for `updatePackageIndex` from agents module
- Added permission check before updating AGENTS.md
- When file modifications are disabled, only update the package index instead of AGENTS.md
- Preserved existing console output behavior when file modifications are allowed

Fixes #6
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
opensrc Ignored Ignored Jan 26, 2026 2:39pm

@ctate ctate merged commit 95fa8c7 into main Jan 26, 2026
3 checks 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.

bug: remove command doesn't respect allowFileModifications setting in opensrc/package.json

1 participant