diff --git a/Cargo.lock b/Cargo.lock index 54882f7..4f0cdcb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -90,9 +90,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -100,9 +100,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.51" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -572,7 +572,7 @@ dependencies = [ [[package]] name = "tend" -version = "0.2.20" +version = "0.2.21" dependencies = [ "anyhow", "clap", diff --git a/Cargo.toml b/Cargo.toml index 081b855..4b2b6ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tend" -version = "0.2.20" +version = "0.2.21" authors = ["Ľubomír Kurčák "] description = "Command-line tool for managing and running multiple processes" edition = "2024" @@ -21,7 +21,7 @@ exclude = [ [dependencies] anyhow = "1.0.100" -clap = { version = "4.5.51", features = ["derive"] } +clap = { version = "4.5.53", features = ["derive"] } colored = "3.0.0" dirs-next = "2.0.0" folktime = "0.2.1" diff --git a/src/job/template.rs b/src/job/template.rs index cb56abb..767a5d7 100644 --- a/src/job/template.rs +++ b/src/job/template.rs @@ -61,6 +61,15 @@ impl Job { }, action: Action::FastRestart, }); + + self.event_hooks.push(Hook { + name: "no such container hook".to_string(), + event: Event::DetectSubstring { + contains: "No such container:".to_string(), + stream: Stream::Any, + }, + action: Action::Restart, + }); } } }