File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,14 @@ fn main() -> anyhow::Result<()> {
5757 . write ( Path :: new ( DEFAULT_CONFIG_PATH ) )
5858 . context ( "cannot write config" ) ?;
5959 println ! ( "Created config file at {DEFAULT_CONFIG_PATH}" ) ;
60- std:: fs:: write ( DEFAULT_RUST_VERSION_PATH , "" )
61- . context ( "cannot write rust-version file" ) ?;
62- println ! ( "Created empty rust-version file at {DEFAULT_RUST_VERSION_PATH}" ) ;
60+
61+ if !Path :: new ( DEFAULT_RUST_VERSION_PATH ) . is_file ( ) {
62+ std:: fs:: write ( DEFAULT_RUST_VERSION_PATH , "" )
63+ . context ( "cannot write rust-version file" ) ?;
64+ println ! ( "Created empty rust-version file at {DEFAULT_RUST_VERSION_PATH}" ) ;
65+ } else {
66+ println ! ( "{DEFAULT_RUST_VERSION_PATH} already exists, not doing anything with it" ) ;
67+ }
6368 }
6469 Command :: Pull {
6570 config_path,
You can’t perform that action at this time.
0 commit comments