Bypassing prompt (to press return) in homebrew install script

前端 未结 5 1615
灰色年华
灰色年华 2020-12-25 11:50

Very simple script that installs homebrew:

  #!/bin/bash

  ruby -e \"$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)\"

T

5条回答
  •  遥遥无期
    2020-12-25 12:40

    Reading the source of https://raw.github.com/Homebrew/homebrew/go/install -- it only prompts if stdin is a TTY. If you redirect stdin from /dev/null, it won't prompt at all. So:

    ruby \
      -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" \
      

提交回复
热议问题