Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
@@ -0,0 +1,5 @@
+---
+"cli.rs": patch
+
+On Windows, Fix `beforeDevCommand` and `beforeBuildCommand` not executing the expected command if it contains quotes. This is done by executing them with `CMD /S /C {command}` instead of `CMD /C {command}` on Windows.
@@ -75,6 +75,7 @@ pub fn command(options: Options) -> Result<()> {
#[cfg(target_os = "windows")]
execute_with_output(
Command::new("cmd")
+ .arg("/S")
.arg("/C")
.arg(before_build)
.current_dir(app_dir())
@@ -108,6 +108,7 @@ pub fn command(options: Options) -> Result<()> {
logger.log(format!("Running `{}`", before_dev));
let child = Command::new("cmd")
.arg(before_dev)