summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-03-15 09:58:44 -0400
committerGitHub <noreply@github.com>2023-03-15 19:28:44 +0530
commit2ca160702795bb1b92196a848f7e4814d23ed32c (patch)
treecb9676f274380f0764d31d6aaa2c9218dc7f0d6e
parent72ced378212b5d3f648c850b304036dfd3614ffe (diff)
chore(core): don't print cargo directives if not creating snapshot (#18205)
-rw-r--r--core/runtime.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/runtime.rs b/core/runtime.rs
index c3768d5fa..ef6d4d2f2 100644
--- a/core/runtime.rs
+++ b/core/runtime.rs
@@ -604,12 +604,14 @@ impl JsRuntime {
.collect::<Vec<ExtensionFileSource>>();
#[cfg(feature = "include_js_files_for_snapshotting")]
- for source in &esm_sources {
- use crate::ExtensionFileSourceCode;
- if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) =
- &source.code
- {
- println!("cargo:rerun-if-changed={}", path.display())
+ if snapshot_options != SnapshotOptions::None {
+ for source in &esm_sources {
+ use crate::ExtensionFileSourceCode;
+ if let ExtensionFileSourceCode::LoadedFromFsDuringSnapshot(path) =
+ &source.code
+ {
+ println!("cargo:rerun-if-changed={}", path.display())
+ }
}
}