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

installer script fails when tput is unavailable #371

Closed
abernix opened this issue Mar 26, 2021 · 0 comments · Fixed by #372
Closed

installer script fails when tput is unavailable #371

abernix opened this issue Mar 26, 2021 · 0 comments · Fixed by #372
Labels

Comments

@abernix
Copy link
Member

abernix commented Mar 26, 2021

Description

When running the installer in a more minimalistic shell/environment (e.g., Alpine), the installer fails because of an absence of the tput command. The tput command is leveraged to power ANSI colors in the installer output.

Could we consider making tput an optional dependency of the installer script where — in its absence — the use of colored terminal output would degrade gracefully?

The existing Spaceport installer guarded against the absence of this tput command: https://github.com/apollographql/spaceport/blob/44d8921e6e4d098fdc90dfbded7b959c60d8cb0a/public/install.sh#L1-L24

Steps to reproduce

This requires Docker, but this should reproduce:

docker run --rm -t -i alpine:latest \
  sh -c 'apk add curl && curl -sSL https://raw.githubusercontent.com/apollographql/rover/v0.0.4/installers/binstall/scripts/nix/install.sh | sh'

Expected result

Rover installation!

Actual result

/ # curl -sSL https://raw.githubusercontent.com/apollographql/rover/v0.0.4/installers/binstall/scripts/nix/install.sh | sh
sh: tput: not found
sh: tput: not found
sh: tput: not found
sh: tput: not found
ERROR: need 'tput' (command not found)
/ #

Environment

Run rover info and paste the results here Can't install!

  • Operating system and version: Alpine Linux

  • Shell (bash/zsh/powershell):

    / # cat /etc/os-release
    NAME="Alpine Linux"
    ID=alpine
    VERSION_ID=3.12.0
    PRETTY_NAME="Alpine Linux v3.12"
    HOME_URL="https://alpinelinux.org/"
    BUG_REPORT_URL="https://bugs.alpinelinux.org/"
    / #
    
  • Version of Rover (rover --help): In theory, 0.0.4

  • Installation method: curl

@abernix abernix changed the title installer script fails because of absence of tput installer script fails when tput is unavailable Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant