summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorAbsebo <abseboco@gmail.com>2020-10-19 23:53:39 +0200
committerGitHub <noreply@github.com>2020-10-19 23:53:39 +0200
commit1474d5d76d38c094c6c551bcd23a61f8328bb258 (patch)
tree4204448f1a03aefc776c2041f630479e0bbae7cc /cli/main.rs
parentc488468b32ef3869a233190437641e5ec8ef11b6 (diff)
fix(cli): Handling of relative importmaps while using watch (#7950)
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/cli/main.rs b/cli/main.rs
index ecf8d5fc7..48e76d9ab 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -520,11 +520,8 @@ async fn run_with_watch(flags: Flags, script: String) -> Result<(), AnyError> {
.collect();
if let Some(import_map) = program_state.flags.import_map_path.clone() {
- paths_to_watch.push(
- Url::parse(&format!("file://{}", &import_map))?
- .to_file_path()
- .unwrap(),
- );
+ paths_to_watch
+ .push(fs::resolve_from_cwd(std::path::Path::new(&import_map)).unwrap());
}
// FIXME(bartlomieju): new file watcher is created on after each restart