File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " create-tauri-app " : " patch"
3+ " create-tauri-app-js " : " patch"
4+ ---
5+
6+ Skip deleting ` .git ` directory when initalizing a project in an already existing directoy.
7+
Original file line number Diff line number Diff line change 11[workspace ]
2+ resolver = " 2"
23members = [" packages/cli" , " packages/cli/node" ]
34
45[profile .release ]
Original file line number Diff line number Diff line change @@ -269,12 +269,15 @@ where
269269 // Remove the target dir contents before rendering the template
270270 // SAFETY: Upon reaching this line, the user already accepted to overwrite
271271 if target_dir. exists ( ) {
272+ #[ inline( always) ]
272273 fn clean_dir ( dir : & std:: path:: PathBuf ) -> anyhow:: Result < ( ) > {
273274 for entry in fs:: read_dir ( dir) ?. flatten ( ) {
274275 let path = entry. path ( ) ;
275276 if entry. file_type ( ) ?. is_dir ( ) {
276- clean_dir ( & path) ?;
277- std:: fs:: remove_dir ( path) ?;
277+ if entry. file_name ( ) != ".git" {
278+ clean_dir ( & path) ?;
279+ std:: fs:: remove_dir ( path) ?;
280+ }
278281 } else {
279282 fs:: remove_file ( path) ?;
280283 }
You can’t perform that action at this time.
0 commit comments