Skip to content
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

Conditional check for tty/non-tty in case of wait (i.e. read) #617

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

s1061123
Copy link
Member

Fix #615.

@s1061123
Copy link
Member Author

Here's the sample output of tty -s

$ docker run --entrypoint="" centos/tools /bin/bash -c 'if tty -s; then echo "tty"; read; else echo "not TTY"; sleep 3; fi'
not TTY
$ docker run -t --entrypoint="" centos/tools /bin/bash -c 'if tty -s; then echo "tty"; read; else echo "not TTY"; sleep 3; fi'
tty

@coveralls
Copy link

coveralls commented Feb 24, 2021

Pull Request Test Coverage Report for Build 599854235

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 70.694%

Totals Coverage Status
Change from base Build 595134999: 0.0%
Covered Lines: 1141
Relevant Lines: 1614

💛 - Coveralls

images/entrypoint.sh Outdated Show resolved Hide resolved
Copy link
Member

@dougbtv dougbtv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dougbtv dougbtv merged commit c1166d2 into k8snetworkplumbingwg:master Feb 25, 2021
@s1061123 s1061123 deleted the fix/check-tty branch February 26, 2021 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read command in entrypoint may not work without a TTY
4 participants