File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ pub fn init() -> Result<()> {
5757 bail ! ( "The current directory is already part of a Cargo project.\n Please initialize Rustlings in a different directory" ) ;
5858 }
5959
60+ stdout. write_all ( b"This command will create the directory `rustlings/` as a member of this Cargo workspace.\n Press ENTER to continue " ) ?;
61+ press_enter_prompt ( & mut stdout) ?;
62+
6063 // Make sure "rustlings" is added to `workspace.members` by making
6164 // Cargo initialize a new project.
6265 let status = Command :: new ( "cargo" )
@@ -76,11 +79,11 @@ pub fn init() -> Result<()> {
7679 fs:: remove_dir_all ( "rustlings" )
7780 . context ( "Failed to remove the temporary directory `rustlings/`" ) ?;
7881 init_git = false ;
82+ } else {
83+ stdout. write_all ( b"This command will create the directory `rustlings/` which will contain the exercises.\n Press ENTER to continue " ) ?;
84+ press_enter_prompt ( & mut stdout) ?;
7985 }
8086
81- stdout. write_all ( b"This command will create the directory `rustlings/` which will contain the exercises.\n Press ENTER to continue " ) ?;
82- press_enter_prompt ( & mut stdout) ?;
83-
8487 create_dir ( rustlings_dir) . context ( "Failed to create the `rustlings/` directory" ) ?;
8588 set_current_dir ( rustlings_dir)
8689 . context ( "Failed to change the current directory to `rustlings/`" ) ?;
You can’t perform that action at this time.
0 commit comments