summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index ab8d6b503..96f4e9a74 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -1130,6 +1130,18 @@ impl CliOptions {
&self.flags.ext
}
+ pub fn has_hmr(&self) -> bool {
+ if let DenoSubcommand::Run(RunFlags {
+ watch: Some(WatchFlagsWithPaths { hmr, .. }),
+ ..
+ }) = &self.flags.subcommand
+ {
+ *hmr
+ } else {
+ false
+ }
+ }
+
/// If the --inspect or --inspect-brk flags are used.
pub fn is_inspecting(&self) -> bool {
self.flags.inspect.is_some()