Skip to content

Navigation Menu

Sign in
Sign up

bug: mac/bsd vs linux detection doesn't work properly and on linux, code always complains about permission of the credential file #14

bennetyee started this conversation in General
Discussion options

this

main...bennetyee:SPAN-API-Client-Docs:mac-v-linux

works, but maybe a different fix would be preferred?

You must be logged in to vote

Replies: 2 comments

Comment options

Another possibility is instead of

 perms=$(stat -f "%Lp" "$path" 2>/dev/null || stat -c "%a" "$path" 2>/dev/null)

do instead

 perms=$(python3 -c 'import os,sys; print(f"{os.stat(sys.argv[1]).st_mode & 0o777:o}");' "$path")
You must be logged in to vote
0 replies
Comment options

Fix pending — your patch direction has been picked up.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /