deno_task_shell 0.30.0

Cross platform scripting for deno task
Documentation
1
2
3
4
5
6
7
8
9
10
11
// Copyright 2018-2025 the Deno authors. MIT license.

use std::path::Path;
use std::path::PathBuf;

use anyhow::Result;

/// Similar to `std::fs::canonicalize()` but strips UNC prefixes on Windows.
pub fn canonicalize_path(path: &Path) -> Result<PathBuf> {
  Ok(deno_path_util::strip_unc_prefix(path.canonicalize()?))
}