Skip to content

Commit

Permalink
Change confirm text
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Nov 16, 2023
1 parent fd23965 commit 4e44d02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<'src, D> Recipe<'src, D> {

pub(crate) fn confirm(&self) -> RunResult<'src, bool> {
if self.attributes.contains(&Attribute::Confirm) {
print!("Confirm running {} (y/N): ", self.name);
print!("Run recipe `{}`? ", self.name);
let mut line = String::new();
std::io::stdout().flush().map_err(|e| Error::Io {
recipe: self.name(),
Expand Down
8 changes: 4 additions & 4 deletions tests/confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn confirm_recipe() {
",
)
.stderr("echo confirmed\n")
.stdout("Confirm running requires_confirmation (y/N): confirmed\n")
.stdout("Run recipe `requires_confirmation`? confirmed\n")
.stdin("y")
.run();
}
Expand All @@ -65,7 +65,7 @@ fn recipe_with_confirm_recipe_dependency() {
",
)
.stderr("echo confirmed\necho confirmed2\n")
.stdout("Confirm running requires_confirmation (y/N): confirmed\nconfirmed2\n")
.stdout("Run recipe `requires_confirmation`? confirmed\nconfirmed2\n")
.stdin("y")
.run();
}
Expand All @@ -81,7 +81,7 @@ fn do_not_confirm_recipe() {
",
)
.stderr("error: Recipe `requires_confirmation` was not confirmed\n")
.stdout("Confirm running requires_confirmation (y/N): ")
.stdout("Run recipe `requires_confirmation`? ")
.status(1)
.run();
}
Expand All @@ -100,7 +100,7 @@ fn do_not_confirm_recipe_with_confirm_recipe_dependency() {
",
)
.stderr("error: Recipe `requires_confirmation` was not confirmed\n")
.stdout("Confirm running requires_confirmation (y/N): ")
.stdout("Run recipe `requires_confirmation`? ")
.status(1)
.run();
}

0 comments on commit 4e44d02

Please sign in to comment.