From 91ef904e57be4ca2ec809c2e17c415adb46c03f6 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Fri, 19 Jun 2020 22:29:28 +0300 Subject: [PATCH] Run -y on remote topgrades if necessary --- src/steps/generic.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/steps/generic.rs b/src/steps/generic.rs index 9b9f2b91..cf1a8024 100644 --- a/src/steps/generic.rs +++ b/src/steps/generic.rs @@ -264,6 +264,10 @@ pub fn run_remote_topgrade(ctx: &ExecutionContext, hostname: &str) -> Result<()> let env = format!("TOPGRADE_PREFIX={}", hostname); args.extend(&["env", &env, "topgrade"]); + if ctx.config().yes() { + args.push("-y"); + } + ctx.run_type().execute(&ssh).args(&args).check_run() } }