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<()> {
57
57
. write ( Path :: new ( DEFAULT_CONFIG_PATH ) )
58
58
. context ( "cannot write config" ) ?;
59
59
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
+ }
63
68
}
64
69
Command :: Pull {
65
70
config_path,
You can’t perform that action at this time.
0 commit comments