diff options
| author | frozolotl <44589151+frozolotl@users.noreply.github.com> | 2024-03-23 12:54:50 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2024-05-17 14:27:58 +0200 |
| commit | 784488c5225534ee7e3848df186d059cb6cbeed5 (patch) | |
| tree | d874225b4ab958efa125007898f6ed0f66dd7c3c /crates/typst-cli/src | |
| parent | 3a5a4d9227f25ac9863b0af8e242b39bef71ae9c (diff) | |
Escape path and entrypoint in `typst init` output (#3753)
Diffstat (limited to 'crates/typst-cli/src')
| -rw-r--r-- | crates/typst-cli/src/init.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/typst-cli/src/init.rs b/crates/typst-cli/src/init.rs index 01fdb02f..b0446bd1 100644 --- a/crates/typst-cli/src/init.rs +++ b/crates/typst-cli/src/init.rs @@ -104,11 +104,19 @@ fn print_summary( out.set_color(&gray)?; write!(out, "> ")?; out.reset()?; - writeln!(out, "cd {}", project_dir.display())?; + writeln!( + out, + "cd {}", + shell_escape::escape(project_dir.display().to_string().into()), + )?; out.set_color(&gray)?; write!(out, "> ")?; out.reset()?; - writeln!(out, "typst watch {}", template.entrypoint)?; + writeln!( + out, + "typst watch {}", + shell_escape::escape(template.entrypoint.to_string().into()), + )?; writeln!(out)?; Ok(()) } |
