Repository navigation
Fix update stay-awake parent check under non-C locales - #14943
Open
thesteganos wants to merge 1 commit into
Open
thesteganos wants to merge 1 commit into
thesteganos wants to merge 1 commit into
Conversation
stat %F is translated by the locale (e.g. 'diretório' in pt_BR), so the comparison against 'directory' failed and the update was refused with an unsafe state path error. Force the C locale for that call. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
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.
Problem
On a system with a non-English locale,
omarchy update(and thereforeomarchy-channel-set) aborts right after the snapshot step with:root_owned_parent_chaininbin/omarchy-update-stay-awakereads the file type withstat -c %Fand compares it todirectory.%Fis translated by the locale. Underpt_BR.UTF-8it returnsdiretório, so the check fails on/run/usereven though the whole parent chain is root-owned and not group/other writable.Fix
Run that
statcall withLC_ALL=C, so%Fis always the untranslated name. The numeric%u/%afields are unaffected. This is the onlystat ... %Fin the repo.Testing
LANG=pt_BR.UTF-8,test/shell.d/update-stay-awake-security-test.shfails right away on the currentquattro(0/15) and passes fully with this change (15/15).omarchy-channel-set devcompleted on a pt_BR system once this change was in place.🤖 Generated with Claude Code