fixes
parent
ab96d1babf
commit
9fca3b6a06
|
@ -94,7 +94,7 @@ impl AppOption {
|
|||
"--close-from n | -C n",
|
||||
"Close all file descriptors greater than or equal to n.",
|
||||
),
|
||||
AppOption::GenerateConfig => ("--gen-config", "Print example config to standard output."),
|
||||
AppOption::GenerateConfig => ("--gen-conf", "Print example config to standard output."),
|
||||
AppOption::Group => (
|
||||
"--group | -g",
|
||||
"Run the command with the primary group set to group.",
|
||||
|
|
|
@ -81,7 +81,14 @@ pub fn execute(app: App) -> Result<(), String> {
|
|||
cmd.env("HOME", home_dir);
|
||||
}
|
||||
// execute the child
|
||||
let mut child = cmd.spawn().unwrap();
|
||||
let mut child = if let Ok(child) = cmd.spawn() {
|
||||
child
|
||||
} else {
|
||||
return Err(format![
|
||||
"Error: {}: Command not found.",
|
||||
args.first().unwrap()
|
||||
]);
|
||||
};
|
||||
if app.background {
|
||||
std::process::exit(0);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue