Skip to content

Commit 6c54221

Browse files
committed
Ensure 'kill' is in PATH
1 parent 0dc5d28 commit 6c54221

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ fn main() {
4848
}
4949
}
5050

51+
match Command::new("sh")
52+
.arg("-c")
53+
.arg("command -v kill >/dev/null 2>&1")
54+
.status()
55+
{
56+
Ok(s) if s.success() => {}
57+
_ => {
58+
eprintln!(
59+
"Required 'kill' command not found in PATH.\nPlease ensure 'kill' is installed and available in your PATH."
60+
);
61+
std::process::exit(1);
62+
}
63+
}
64+
5165
let args = Cli::parse();
5266

5367
if args.verbose {

0 commit comments

Comments
 (0)