Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/cli/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::cmd;
use crate::config::Config;
use crate::env;
use crate::exit::exit;
use crate::task::Deps;
use crate::toolset::ToolsetBuilder;
use clap::{CommandFactory, ValueEnum, ValueHint};
use console::style;
Expand Down Expand Up @@ -179,13 +180,20 @@ impl Watch {
args.push("--watch-file".to_string());
args.push(watch_file.to_string_lossy().to_string());
}
let globs = if self.glob.is_empty() {
let globs = if !self.glob.is_empty() {
self.glob.clone()
} else if self.skip_deps {
tasks
.iter()
.flat_map(|t| t.sources.clone())
.flat_map(|t| t.sources.iter().cloned())
.unique()
.collect::<Vec<_>>()
} else {
self.glob.clone()
let deps = Deps::new(&config, tasks.clone()).await?;
deps.all()
.flat_map(|t| t.sources.iter().cloned())
.unique()
.collect::<Vec<_>>()
Comment thread
greptile-apps[bot] marked this conversation as resolved.
};
Comment thread
43081j marked this conversation as resolved.
if !globs.is_empty() {
args.push("-f".to_string());
Expand Down
Loading