mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Add a requirements.txt parser
This commit is contained in:
parent
8b9ac30507
commit
53607df7c6
9 changed files with 872 additions and 2 deletions
30
crates/puffin-cli/src/commands/mod.rs
Normal file
30
crates/puffin-cli/src/commands/mod.rs
Normal 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),
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue