summaryrefslogtreecommitdiff
path: root/cli/args/flags.rs
diff options
context:
space:
mode:
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 {