0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

chore(core): don't print cargo directives if not creating snapshot (#18205)

This commit is contained in:
Bartek Iwańczuk 2023-03-15 09:58:44 -04:00 committed by Yoshiya Hinosawa
parent f2da1716a8
commit a8013e7a0f

View file

@ -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())
}
}
}