diff --git a/src/hooks.rs b/src/hooks.rs index 799feffa..f8ac4f96 100644 --- a/src/hooks.rs +++ b/src/hooks.rs @@ -15,8 +15,14 @@ pub fn spawn_hooks(cfg: Arc, stage: PipelineStage) -> HookHandles { .filter(|hook_cfg| hook_cfg.stage == stage) .map(|hook_cfg| { let mut command = Command::new(hook_cfg.command()); + let current_dir = if cfg!(target_os = "windows") { + dunce::simplified(&cfg.core.working_directory) + } else { + cfg.core.working_directory.as_path() + }; + command - .current_dir(&cfg.core.working_directory) + .current_dir(current_dir) .args(hook_cfg.command_arguments()) .stdout(Stdio::inherit()) .stderr(Stdio::inherit())