summaryrefslogtreecommitdiff
path: root/cli/util/path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/util/path.rs')
-rw-r--r--cli/util/path.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/util/path.rs b/cli/util/path.rs
index 39ba96d6d..ba1d0d926 100644
--- a/cli/util/path.rs
+++ b/cli/util/path.rs
@@ -73,7 +73,9 @@ pub fn mapped_specifier_for_tsc(
pub fn specifier_to_file_path(
specifier: &ModuleSpecifier,
) -> Result<PathBuf, AnyError> {
- let result = if cfg!(windows) {
+ let result = if specifier.scheme() != "file" {
+ Err(())
+ } else if cfg!(windows) {
match specifier.to_file_path() {
Ok(path) => Ok(path),
Err(()) => {