From 2ca160702795bb1b92196a848f7e4814d23ed32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 15 Mar 2023 09:58:44 -0400 Subject: chore(core): don't print cargo directives if not creating snapshot (#18205) --- core/runtime.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'core/runtime.rs') 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::>(); #[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()) + } } } -- cgit v1.2.3