Skip to content

fix(target): detect and fix permission mismatches on status and apply#20

Merged
subbeh merged 1 commit into
mainfrom
fix/perm-aware-diffing
Jul 19, 2026
Merged

fix(target): detect and fix permission mismatches on status and apply#20
subbeh merged 1 commit into
mainfrom
fix/perm-aware-diffing

Conversation

@subbeh

@subbeh subbeh commented Jul 19, 2026

Copy link
Copy Markdown
Owner

status and apply only compared content hashes, so files with correct
content but wrong permissions appeared unchanged. Now both paths check
the target's actual mode against the desired perm from entry attributes
and mark mismatches as modified.

Also add explicit os.Chmod after os.WriteFile in applyFile since
WriteFile only sets permissions on newly-created files.

status and apply only compared content hashes, so files with correct
content but wrong permissions appeared unchanged. Now both paths check
the target's actual mode against the desired perm from entry attributes
and mark mismatches as modified.

Also add explicit os.Chmod after os.WriteFile in applyFile since
WriteFile only sets permissions on newly-created files.
@subbeh
subbeh merged commit 240f710 into main Jul 19, 2026
3 checks passed
@subbeh
subbeh deleted the fix/perm-aware-diffing branch July 19, 2026 01:42
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.

1 participant