2022-12-25 18:29:09 -05:00
|
|
|
use super::Cmd;
|
2022-12-20 18:35:45 -05:00
|
|
|
use clap::Command;
|
2022-12-25 18:29:09 -05:00
|
|
|
use std::{error::Error, process};
|
2022-12-20 12:05:21 -05:00
|
|
|
|
2023-01-13 01:08:32 -05:00
|
|
|
#[derive(Debug, Default)]
|
|
|
|
pub struct False;
|
2022-12-25 18:29:09 -05:00
|
|
|
|
|
|
|
impl Cmd for False {
|
|
|
|
fn cli(&self) -> clap::Command {
|
2023-01-13 01:08:32 -05:00
|
|
|
Command::new("false")
|
2022-12-25 18:29:09 -05:00
|
|
|
.about("Does nothing unsuccessfully")
|
|
|
|
.long_about("Exit with a status code indicating failure")
|
|
|
|
.author("Nathan Fisher")
|
|
|
|
}
|
|
|
|
|
2023-02-04 08:54:27 -05:00
|
|
|
fn run(&self, _matches: &clap::ArgMatches) -> Result<(), Box<dyn Error>> {
|
2022-12-25 18:29:09 -05:00
|
|
|
process::exit(1);
|
|
|
|
}
|
|
|
|
|
2023-01-13 01:08:32 -05:00
|
|
|
fn path(&self) -> Option<crate::Path> {
|
|
|
|
Some(crate::Path::Bin)
|
2022-12-25 18:29:09 -05:00
|
|
|
}
|
2022-12-20 12:05:21 -05:00
|
|
|
}
|