feat: add help text for preview
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -389,7 +389,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "noil"
|
name = "noil"
|
||||||
version = "0.0.3"
|
version = "0.0.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
@@ -22,11 +22,15 @@ impl ApplyCommand {
|
|||||||
|
|
||||||
if !self.commit {
|
if !self.commit {
|
||||||
let action = print_changes(&input, !self.commit).await?;
|
let action = print_changes(&input, !self.commit).await?;
|
||||||
match action {
|
let res = match action {
|
||||||
Action::Quit => Ok(()),
|
Action::Quit => Ok(()),
|
||||||
Action::Apply { original } => apply(&original).await,
|
Action::Apply { original } => apply(&original).await,
|
||||||
Action::Edit => todo!(),
|
Action::Edit => todo!(),
|
||||||
}
|
};
|
||||||
|
|
||||||
|
eprintln!("\nin preview mode: add (--commit) to perform actions");
|
||||||
|
|
||||||
|
res
|
||||||
} else {
|
} else {
|
||||||
apply(&input).await
|
apply(&input).await
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user