From 6be6c517d0691bf1d14eef67668e575c84cdfdf4 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 30 Oct 2020 02:19:03 +0000 Subject: fix(cli/fmt): Strip "\\?\" prefix when displaying Windows paths (#8135) --- cli/tsc_config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/tsc_config.rs') diff --git a/cli/tsc_config.rs b/cli/tsc_config.rs index 93e9dddb2..52daf2e46 100644 --- a/cli/tsc_config.rs +++ b/cli/tsc_config.rs @@ -1,5 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +use crate::fs::canonicalize_path; use deno_core::error::AnyError; use deno_core::serde_json; use deno_core::serde_json::json; @@ -266,7 +267,7 @@ impl TsConfig { if let Some(path) = maybe_path { let cwd = std::env::current_dir()?; let config_file = cwd.join(path); - let config_path = config_file.canonicalize().map_err(|_| { + let config_path = canonicalize_path(&config_file).map_err(|_| { std::io::Error::new( std::io::ErrorKind::InvalidInput, format!( -- cgit v1.2.3