fix(config): portable perms check with BSD fallback, follow symlinks #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/bsd-stat-config-perms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
load_config()perms check now falls back from GNUstat -c '%a'to BSDstat -f '%Lp'so macOS/BSD no longer hard-fail.-Lto dereference symlinks, so dotfile-managed configs (~/.config/forgejo-cli/config->~/dotfiles/...) report the target's mode instead of777.Why
stat -cbreaks the CLI on macOS/BSD entirely.-L, symlinked configs are falsely rejected as insecure (777is the link mode, not the file mode).