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<()> {
57
57
bail ! ( "The current directory is already part of a Cargo project.\n Please initialize Rustlings in a different directory" ) ;
58
58
}
59
59
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
+
60
63
// Make sure "rustlings" is added to `workspace.members` by making
61
64
// Cargo initialize a new project.
62
65
let status = Command :: new ( "cargo" )
@@ -76,11 +79,11 @@ pub fn init() -> Result<()> {
76
79
fs:: remove_dir_all ( "rustlings" )
77
80
. context ( "Failed to remove the temporary directory `rustlings/`" ) ?;
78
81
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) ?;
79
85
}
80
86
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
-
84
87
create_dir ( rustlings_dir) . context ( "Failed to create the `rustlings/` directory" ) ?;
85
88
set_current_dir ( rustlings_dir)
86
89
. context ( "Failed to change the current directory to `rustlings/`" ) ?;
You can’t perform that action at this time.
0 commit comments