mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 14:22:35 +00:00
Modify wording of confirmation request before creation of .gitignore
This commit is contained in:
parent
73ce3f814a
commit
5316089e61
1 changed files with 2 additions and 6 deletions
|
@ -119,16 +119,12 @@ fn init(args: &ArgMatches) -> Result<(), Box<Error>> {
|
|||
let is_dest_inside_root = book.get_dest().starts_with(book.get_root());
|
||||
|
||||
if !args.is_present("force") && is_dest_inside_root {
|
||||
let gitignore = book.get_dest().join(".gitignore");
|
||||
println!("\nCreating default .gitignore at {:?}", gitignore);
|
||||
print!("\nAre you sure you want to continue? (y/n) ");
|
||||
println!("\nDo you want a .gitignore to be created? (y/n)");
|
||||
|
||||
if confirm() {
|
||||
book.create_gitignore();
|
||||
println!("\n.gitignore created.");
|
||||
} else {
|
||||
println!("\nSkipping...\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
println!("\nAll done, no errors...");
|
||||
|
|
Loading…
Reference in a new issue