Add minor refactorings (#754)
This commit is contained in:
@@ -17,7 +17,7 @@ pub fn ssh_step(ctx: &ExecutionContext, hostname: &str) -> Result<()> {
|
||||
}
|
||||
|
||||
let env = format!("TOPGRADE_PREFIX={}", hostname);
|
||||
args.extend(&["env", &env, "$SHELL", "-lc", topgrade]);
|
||||
args.extend(["env", &env, "$SHELL", "-lc", topgrade]);
|
||||
|
||||
if ctx.config().yes() {
|
||||
args.push("-y");
|
||||
@@ -45,7 +45,7 @@ pub fn ssh_step(ctx: &ExecutionContext, hostname: &str) -> Result<()> {
|
||||
}
|
||||
|
||||
let env = format!("TOPGRADE_PREFIX={}", hostname);
|
||||
args.extend(&["env", &env, "$SHELL", "-lc", topgrade]);
|
||||
args.extend(["env", &env, "$SHELL", "-lc", topgrade]);
|
||||
|
||||
if ctx.config().yes() {
|
||||
args.push("-y");
|
||||
|
||||
@@ -110,7 +110,7 @@ impl<'a> TemporaryPowerOn<'a> {
|
||||
|
||||
ctx.run_type()
|
||||
.execute(vagrant)
|
||||
.args(&[subcommand, &vagrant_box.name])
|
||||
.args([subcommand, &vagrant_box.name])
|
||||
.current_dir(vagrant_box.path.clone())
|
||||
.check_run()?;
|
||||
Ok(TemporaryPowerOn {
|
||||
@@ -137,7 +137,7 @@ impl<'a> Drop for TemporaryPowerOn<'a> {
|
||||
self.ctx
|
||||
.run_type()
|
||||
.execute(self.vagrant)
|
||||
.args(&[subcommand, &self.vagrant_box.name])
|
||||
.args([subcommand, &self.vagrant_box.name])
|
||||
.current_dir(self.vagrant_box.path.clone())
|
||||
.check_run()
|
||||
.ok();
|
||||
@@ -195,6 +195,6 @@ pub fn topgrade_vagrant_box(ctx: &ExecutionContext, vagrant_box: &VagrantBox) ->
|
||||
ctx.run_type()
|
||||
.execute(&vagrant.path)
|
||||
.current_dir(&vagrant_box.path)
|
||||
.args(&["ssh", "-c", &command])
|
||||
.args(["ssh", "-c", &command])
|
||||
.check_run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user