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

fix: install_unix.sh breaks with status code 2 in non-interactive environments #1813

Open
wants to merge 4 commits into
base: release/v1.59.0
Choose a base branch
from

Conversation

dithmer
Copy link

@dithmer dithmer commented Aug 24, 2024

Proposed Change

The script "install_unix.sh" was not working in non-interactive shells, because there are tools used (stty and tput) for which a connected tty is mandatory. This is being fixed by a sh-compliant way of checking if the $- contains the i-flag.

Checklist
  • Changes are tested
  • CI has passed

@CLAassistant
Copy link

CLAassistant commented Aug 24, 2024

CLA assistant check
All committers have signed the CLA.

@dithmer dithmer changed the title fix(OPTIONAL): fix install_unix.sh breaking with return code 2 in non-interactive environments fix: fix install_unix.sh breaking with return code 2 in non-interactive environments Aug 24, 2024
@dithmer dithmer changed the title fix: fix install_unix.sh breaking with return code 2 in non-interactive environments fix: install_unix.sh breaks with status code 2 in non-interactive environments Aug 25, 2024
Comment on lines +38 to +42
IS_INTERACTIVE="false"
case "$-" in
*i*) IS_INTERACTIVE="true" ;;
esac

Copy link
Member

Choose a reason for hiding this comment

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

This seems to always be false in the environment I'm testing in 🤔

For reference, I'm testing in a fresh Ubuntu Server 24.04 install. The exiting with status code 2 issue is fixed, but we don't get the coloring like we should.

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.

5 participants