Modify wording of confirmation request before creation of .gitignore

This commit is contained in:
Mathieu David 2016-03-02 19:38:39 +01:00
parent 73ce3f814a
commit 5316089e61
1 changed files with 2 additions and 6 deletions

View File

@ -119,15 +119,11 @@ fn init(args: &ArgMatches) -> Result<(), Box<Error>> {
let is_dest_inside_root = book.get_dest().starts_with(book.get_root()); let is_dest_inside_root = book.get_dest().starts_with(book.get_root());
if !args.is_present("force") && is_dest_inside_root { if !args.is_present("force") && is_dest_inside_root {
let gitignore = book.get_dest().join(".gitignore"); println!("\nDo you want a .gitignore to be created? (y/n)");
println!("\nCreating default .gitignore at {:?}", gitignore);
print!("\nAre you sure you want to continue? (y/n) ");
if confirm() { if confirm() {
book.create_gitignore(); book.create_gitignore();
println!("\n.gitignore created."); println!("\n.gitignore created.");
} else {
println!("\nSkipping...\n");
} }
} }