Initial public release of Warp.

Repo-Sync-Origin: warpdotdev/warp-internal@12af1d983b
This commit is contained in:
David Stern
2026-04-28 08:43:33 -05:00
commit 0dbd3d567a
4982 changed files with 1431549 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
use std::str::FromStr;
use serde::{Deserialize, Serialize};
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(untagged, rename_all = "snake_case")]
pub enum RootAccess {
IsRoot,
CanRunSudo,
#[default]
NoRootAccess,
}
impl FromStr for RootAccess {
type Err = anyhow::Error;
fn from_str(input: &str) -> Result<Self, Self::Err> {
match input {
"is_root" => Ok(RootAccess::IsRoot),
"can_run_sudo" => Ok(RootAccess::CanRunSudo),
"no_root_access" => Ok(RootAccess::NoRootAccess),
_ => Err(anyhow::anyhow!("Invalid RootAccess")),
}
}
}