diff --git a/src/config/rt/core.rs b/src/config/rt/core.rs index e67c2583..4e8aef69 100644 --- a/src/config/rt/core.rs +++ b/src/config/rt/core.rs @@ -22,8 +22,7 @@ impl RtcCore { let trunk_version = config.trunk_version.clone(); - let working_directory = working_directory - .canonicalize() + let working_directory = dunce::canonicalize(&working_directory) .with_context(|| format!("unable to canonicalize '{}'", working_directory.display()))?; let dist = diff --git a/src/hooks.rs b/src/hooks.rs index f8ac4f96..a62519c5 100644 --- a/src/hooks.rs +++ b/src/hooks.rs @@ -15,14 +15,9 @@ 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(current_dir) + .current_dir(&cfg.core.working_directory) .args(hook_cfg.command_arguments()) .stdout(Stdio::inherit()) .stderr(Stdio::inherit()) diff --git a/src/pipelines/tailwind_css.rs b/src/pipelines/tailwind_css.rs index 08d48c46..e74a9d14 100644 --- a/src/pipelines/tailwind_css.rs +++ b/src/pipelines/tailwind_css.rs @@ -111,16 +111,11 @@ impl TailwindCss { let rel_path = common::strip_prefix(&self.asset.path); tracing::debug!(path = ?rel_path, "compiling tailwind css"); - let current_dir = if cfg!(target_os = "windows") { - dunce::simplified(&self.cfg.core.working_directory) - } else { - self.cfg.core.working_directory.as_path() - }; common::run_command( Application::TailwindCss.name(), &tailwind, &args, - current_dir, + &self.cfg.core.working_directory, ) .await?;