summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-11-14 13:06:00 -0800
committerGitHub <noreply@github.com>2023-11-14 22:06:00 +0100
commitab0c637425c3219c2a5f59c25ae8ea593018568b (patch)
treee8c3275e39a43e81a89386f9bcbb530185c24eb9 /cli/args/flags.rs
parentd342c0df71bd3da75330af3dbf2949e8dab36c2b (diff)
perf: move jupyter esm out of main snapshot (#21163)
Towards https://github.com/denoland/deno/issues/21136
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r--cli/args/flags.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs
index 96cd0bbfe..235743bda 100644
--- a/cli/args/flags.rs
+++ b/cli/args/flags.rs
@@ -206,7 +206,7 @@ pub struct ReplFlags {
pub is_default_command: bool,
}
-#[derive(Clone, Debug, Eq, PartialEq)]
+#[derive(Clone, Debug, Eq, PartialEq, Default)]
pub struct RunFlags {
pub script: String,
pub watch: Option<WatchFlagsWithPaths>,
@@ -311,6 +311,10 @@ impl DenoSubcommand {
pub fn is_run(&self) -> bool {
matches!(self, Self::Run(_))
}
+
+ pub fn is_test_or_jupyter(&self) -> bool {
+ matches!(self, Self::Test(_) | Self::Jupyter(_))
+ }
}
impl Default for DenoSubcommand {