Skip to content

Commit a5c6dd9

Browse files
authored
fix: wrap the cd <dir> instruction in quotes (#305)
1 parent f5e1819 commit a5c6dd9

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.changes/wrap-path-in-quotes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": "patch"
3+
---
4+
5+
Wrap the `cd <dir>` instruction in quotes if the project name containts spaces.

packages/cli/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,14 @@ where
208208
}
209209
println!();
210210
println!("Done, Now run:");
211-
println!(" cd {}", project_name);
211+
println!(
212+
" cd {}",
213+
if project_name.contains(' ') {
214+
format!("\"{}\"", project_name)
215+
} else {
216+
project_name
217+
}
218+
);
212219
if let Some(cmd) = pkg_manager.install_cmd() {
213220
println!(" {}", cmd);
214221
}

0 commit comments

Comments
 (0)