mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
@@ -0,0 +1,28 @@
|
||||
use codex_package_manager::PackageManagerError;
|
||||
use std::path::PathBuf;
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors raised while locating, validating, or installing an artifact runtime.
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ArtifactRuntimeError {
|
||||
#[error(transparent)]
|
||||
PackageManager(#[from] PackageManagerError),
|
||||
#[error("{context}")]
|
||||
Io {
|
||||
context: String,
|
||||
#[source]
|
||||
source: std::io::Error,
|
||||
},
|
||||
#[error("invalid manifest at {path}")]
|
||||
InvalidManifest {
|
||||
path: PathBuf,
|
||||
#[source]
|
||||
source: serde_json::Error,
|
||||
},
|
||||
#[error("runtime path `{0}` is invalid")]
|
||||
InvalidRuntimePath(String),
|
||||
#[error(
|
||||
"no compatible JavaScript runtime found for artifact runtime at {root_dir}; install Node or the Codex desktop app"
|
||||
)]
|
||||
MissingJsRuntime { root_dir: PathBuf },
|
||||
}
|
||||
Reference in New Issue
Block a user