1
0
mirror of https://github.com/rancher/os.git synced 2025-08-06 17:24:16 +00:00

Don't prompt for user input when we're not interactive

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-01-18 02:08:16 +00:00
parent 7765a3308d
commit fc1e4e060d

View File

@ -154,7 +154,7 @@ func runInstall(image, installType, cloudConfig, device, kappend string, force,
fmt.Printf("Installing from %s\n", image)
if !force {
if !yes("Continue") {
if util.IsRunningInTty() && !yes("Continue") {
log.Infof("Not continuing with installation due to user not saying 'yes'")
os.Exit(1)
}