-
-
Notifications
You must be signed in to change notification settings - Fork 389
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
logname may not produce a login name #898
Comments
On a related question. MRI runs rubyspec in GHA right? Is there some option we can provide to run the job with a pty/tty? |
ruby/spec's CI is on GHA (https://github.com/ruby/spec/blob/master/.github/workflows/ci.yml), so it seems the current spec works fine on CRuby on GHA If |
Maybe it's an issue of the JVM/JRuby not inheriting the controlling terminal for subprocesses? |
Since the code was using The comment above does seem to indicate |
Running the specs on JRuby on Github Actions, we see the following message and failing spec:
This can occur when
logname
is run without a controlling terminal. I'm unsure whether this GHA env is not setting up a tty, or if there's an issue launching the command in JRuby that prevents it inheriting the parent terminal, but it seems likeid
would be a more reliable command to use:However I think we are also stacking too many conditions here. I'm unsure of the "best" way to get the current login, but clearly
logname
has issues that make it undesirable.FWIW some forums suggest
logname -t
which will ensure a tty is created, but this flag is not present on BSD-likes.The text was updated successfully, but these errors were encountered: