Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created August 31, 2018 18:51
Show Gist options
  • Save grahamc/c944827ef132d9fce12faa29bc41a350 to your computer and use it in GitHub Desktop.
Save grahamc/c944827ef132d9fce12faa29bc41a350 to your computer and use it in GitHub Desktop.
if [ "$need_tty" = "yes" ]; then
# The installer is going to want to ask for confirmation by
# reading stdin. This script was piped into `sh` though and
# doesn't have stdin to pass to its children. Instead we're going
# to explicitly connect /dev/tty to the installer's stdin.
if [ ! -t 1 ]; then
err "Unable to run interactively. Run with -y to accept defaults, --help for additional options"
fi
"$0" "$@" < /dev/tty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment