-
-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interp/api: set GID #723
interp/api: set GID #723
Conversation
Related Issue: #514 |
cc: @jjzcru |
cc @AcLr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you add a very simple test to check that GID isn't empty? Near where we have the UID tests. Something like [[ -z $GID ]] && echo "GID not set"
expecting the output to be empty.
53dc8a8
to
6a8538c
Compare
I had to add |
Oh, right, Bash sets UID but not GID. I was under the assumption it set both. On the other hand, Zsh does set it: https://askubuntu.com/questions/1124674/why-is-my-gid-environment-variable-empty And I think it's probably harmless if we provide extra built-in information. The interpreter tends to default to bash behavior, but it's also not just for interpreting bash - ideally it should also do an OK job at interpreting POSIX shell, mksh, etc. mksh has KSHGID too, for example. So, sounds good to me :) |
Ah, your last-minute push confused me while merging. Are you done with the changes? |
Also, please squash your commits, as otherwise I'd squash-merge. |
sorry, i did not see you answer in time. i will squash and only keep the readonly checks. |
Set GID environment variable analog to UID. Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
d85d2d3
to
0b864f9
Compare
I can also squash of course, but best if you write your own unified commit message :) |
already done :). I removed the stat test, since it isn't a shell buildin. 👍 |
Set GID environment variable analog to UID.
Rel: go-task/task#561
Signed-off-by: Marcello Sylvester Bauer sylv@sylv.io