removecommand check

This commit is contained in:
Josh Thomas 2024-12-14 00:28:40 -06:00
parent b27b948719
commit cf8fd8dd36

View file

@ -44,17 +44,6 @@ impl Add {
return ExitCode::DuplicateCommand;
}
let command = &self
.original
.split_whitespace()
.next()
.expect("command should be provided");
if Command::new(command).output().is_err() {
eprintln!("Command not found: {}", self.original);
return ExitCode::CommandFailed;
}
let bin_path = match &self.bin_path {
Some(p) if p == config.settings().bin_path() => None,
Some(p) => Some(p.clone()),