summaryrefslogtreecommitdiff
path: root/cli/tools/registry/pm.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/registry/pm.rs')
-rw-r--r--cli/tools/registry/pm.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs
index 52f3310ba..3cdef071f 100644
--- a/cli/tools/registry/pm.rs
+++ b/cli/tools/registry/pm.rs
@@ -289,6 +289,17 @@ pub async fn add(
_ => bail!("Failed updating config file due to no object."),
};
+ if obj.get_string("importMap").is_some() {
+ bail!(
+ concat!(
+ "`deno add` is not supported when configuration file contains an \"importMap\" field. ",
+ "Inline the import map into the Deno configuration file.\n",
+ " at {}",
+ ),
+ config_specifier
+ );
+ }
+
let mut existing_imports = config_file.existing_imports()?;
let is_npm = config_file.is_npm();