Add a requirements.txt parser

This commit is contained in:
Charlie Marsh 2023-10-04 16:54:26 -04:00
parent 8b9ac30507
commit 53607df7c6
9 changed files with 872 additions and 2 deletions

View file

@ -0,0 +1,30 @@
use std::process::ExitCode;
pub(crate) use install::install;
mod install;
#[derive(Copy, Clone)]
pub(crate) enum ExitStatus {
/// The command succeeded.
#[allow(unused)]
Success,
/// The command failed due to an error in the user input.
#[allow(unused)]
Failure,
/// The command failed with an unexpected error.
#[allow(unused)]
Error,
}
impl From<ExitStatus> for ExitCode {
fn from(status: ExitStatus) -> Self {
match status {
ExitStatus::Success => ExitCode::from(0),
ExitStatus::Failure => ExitCode::from(1),
ExitStatus::Error => ExitCode::from(2),
}
}
}