Implement profile inheritance
This commit is contained in:
@@ -21,6 +21,7 @@ pub enum SandboxError {
|
||||
source: toml::de::Error,
|
||||
},
|
||||
ProfileNotFound(String),
|
||||
ProfileCycle(Vec<String>),
|
||||
ConflictingMode,
|
||||
ConflictingEnvKey(String),
|
||||
InvalidEnvEntry(String),
|
||||
@@ -65,6 +66,13 @@ impl std::fmt::Display for SandboxError {
|
||||
write!(f, "cannot parse config file '{}': {source}", path.display())
|
||||
}
|
||||
Self::ProfileNotFound(name) => write!(f, "profile not found in config: {name}"),
|
||||
Self::ProfileCycle(chain) => {
|
||||
write!(
|
||||
f,
|
||||
"profile inheritance cycle detected: {}",
|
||||
chain.join(" -> ")
|
||||
)
|
||||
}
|
||||
Self::ConflictingMode => write!(
|
||||
f,
|
||||
"config section sets both blacklist and whitelist to true"
|
||||
|
||||
Reference in New Issue
Block a user