diff --git a/cli/src/args.rs b/cli/src/args.rs index bc6b7d2..bb0d6eb 100644 --- a/cli/src/args.rs +++ b/cli/src/args.rs @@ -163,7 +163,7 @@ pub fn get_args() -> Result> { .help_heading(Some(OPTSET_OUTPUT)) .help("Do not set WATCHEXEC_*_PATH environment variables for the command") .long("no-environment")) - .arg(Arg::with_name("no-process-group") // TODO + .arg(Arg::with_name("no-process-group") .help_heading(Some(OPTSET_COMMAND)) .help("Do not use a process group when running the command") .long("no-process-group")) diff --git a/cli/src/config/runtime.rs b/cli/src/config/runtime.rs index e95f60b..6a55be8 100644 --- a/cli/src/config/runtime.rs +++ b/cli/src/config/runtime.rs @@ -38,6 +38,10 @@ pub fn runtime(args: &ArgMatches<'static>) -> Result { ))); } + if args.is_present("no-process-group") { + config.command_grouped(false); + } + config.command_shell(if args.is_present("no-shell") { Shell::None } else if let Some(s) = args.value_of("shell") { @@ -174,6 +178,8 @@ pub fn runtime(args: &ArgMatches<'static>) -> Result { fut }); + // TODO: pre-command (environment vars) + Ok(config) } diff --git a/cli/src/filterer/common.rs b/cli/src/filterer/common.rs index a479a3f..2cfbd19 100644 --- a/cli/src/filterer/common.rs +++ b/cli/src/filterer/common.rs @@ -2,7 +2,6 @@ use std::{ collections::HashSet, env, path::{Path, PathBuf}, - sync::Arc, }; use clap::ArgMatches; @@ -10,7 +9,6 @@ use dunce::canonicalize; use miette::{IntoDiagnostic, Result}; use tracing::{debug, warn}; use watchexec::{ - filter::tagged::{Filter, Matcher, Op, Pattern, Regex, TaggedFilterer}, ignore_files::{self, IgnoreFile}, paths::common_prefix, project::{self, ProjectType}, @@ -36,7 +34,7 @@ pub async fn dirs(args: &ArgMatches<'static>) -> Result<(PathBuf, PathBuf)> { Ok((project_origin, workdir)) } -pub async fn ignores(args: &ArgMatches<'static>, origin: &Path) -> Result> { +pub async fn ignores(_args: &ArgMatches<'static>, origin: &Path) -> Result> { let vcs_types = project::types(origin) .await .into_iter() @@ -105,5 +103,8 @@ pub async fn ignores(args: &ArgMatches<'static>, origin: &Path) -> Result) -> Result> { - let (project_origin, workdir) = super::common::dirs(args).await?; - let ignores = super::common::ignores(args, &project_origin).await?; + let (project_origin, _workdir) = super::common::dirs(args).await?; + let _ignores = super::common::ignores(args, &project_origin).await?; // TODO: load ignorefiles let filters = args diff --git a/cli/src/filterer/tagged.rs b/cli/src/filterer/tagged.rs index 0dc1085..397d44e 100644 --- a/cli/src/filterer/tagged.rs +++ b/cli/src/filterer/tagged.rs @@ -1,9 +1,9 @@ use std::sync::Arc; use clap::ArgMatches; -use miette::{IntoDiagnostic, Result}; +use miette::Result; use tracing::debug; -use watchexec::filter::tagged::{Filter, Matcher, Op, Pattern, Regex, TaggedFilterer}; +use watchexec::filter::tagged::{Filter, TaggedFilterer}; pub async fn tagged(args: &ArgMatches<'static>) -> Result> { let (project_origin, workdir) = super::common::dirs(args).await?;