Use sudo and don't try to prompt on no-confirm
This commit is contained in:
parent
d900830f04
commit
47ae6398f8
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -135,13 +135,13 @@ jobs:
|
|||
with:
|
||||
name: harmonic-x86_64-darwin
|
||||
- name: Initial install
|
||||
run: ./harmonic install darwin-multi --no-confirm
|
||||
run: sudo ./harmonic install darwin-multi --no-confirm
|
||||
- name: Test run
|
||||
run: nix run nixpkgs#fortune
|
||||
- name: Initial uninstall
|
||||
run: ./harmonic uninstall --no-confirm
|
||||
run: sudo ./harmonic uninstall --no-confirm
|
||||
- name: Repeated install
|
||||
run: ./harmonic install darwin-multi --no-confirm
|
||||
run: sudo ./harmonic install darwin-multi --no-confirm
|
||||
- name: Repeated uninstall
|
||||
run: ./harmonic uninstall --no-confirm
|
||||
run: sudo ./harmonic uninstall --no-confirm
|
||||
|
|
@ -61,8 +61,10 @@ impl CommandExecute for Install {
|
|||
|
||||
if let Err(err) = plan.install().await {
|
||||
tracing::error!("{:?}", eyre!(err));
|
||||
if !interaction::confirm(plan.describe_revert(explain)).await? {
|
||||
interaction::clean_exit_with_message("Okay, didn't do anything! Bye!").await;
|
||||
if !no_confirm {
|
||||
if !interaction::confirm(plan.describe_revert(explain)).await? {
|
||||
interaction::clean_exit_with_message("Okay, didn't do anything! Bye!").await;
|
||||
}
|
||||
}
|
||||
plan.revert().await?
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue