Support yes flag for Void (#851)
This commit is contained in:
@@ -220,15 +220,19 @@ fn upgrade_suse(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
|
|
||||||
fn upgrade_void(ctx: &ExecutionContext) -> Result<()> {
|
fn upgrade_void(ctx: &ExecutionContext) -> Result<()> {
|
||||||
if let Some(sudo) = ctx.sudo() {
|
if let Some(sudo) = ctx.sudo() {
|
||||||
ctx.run_type()
|
let mut command = ctx.run_type().execute(&sudo);
|
||||||
.execute(&sudo)
|
command.args(&["xbps-install", "-Su", "xbps"]);
|
||||||
.args(&["xbps-install", "-Su", "xbps"])
|
if ctx.config().yes(Step::System) {
|
||||||
.check_run()?;
|
command.arg("-y");
|
||||||
|
}
|
||||||
|
command.check_run()?;
|
||||||
|
|
||||||
ctx.run_type()
|
let mut command = ctx.run_type().execute(&sudo);
|
||||||
.execute(&sudo)
|
command.args(&["xbps-install", "-u"]);
|
||||||
.args(&["xbps-install", "-u"])
|
if ctx.config().yes(Step::System) {
|
||||||
.check_run()?;
|
command.arg("-y");
|
||||||
|
}
|
||||||
|
command.check_run()?;
|
||||||
} else {
|
} else {
|
||||||
print_warning("No sudo detected. Skipping system upgrade");
|
print_warning("No sudo detected. Skipping system upgrade");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user