just/src/attribute.rs
Gökhan Karabulut 8b7640b633
Add [no-exit-message] recipe annotation (#1354)
When a recipe wraps cli tool and the tool exits with a non-zero code,
just adds its own extra exit error message along with the messages
from the tool. Introduce the `[no-exit-message]` attribute to suppress
this additional message.
2022-10-25 16:32:36 -07:00

14 lines
239 B
Rust

use super::*;
#[derive(EnumString)]
#[strum(serialize_all = "kebab_case")]
pub(crate) enum Attribute {
NoExitMessage,
}
impl Attribute {
pub(crate) fn from_name(name: Name) -> Option<Attribute> {
name.lexeme().parse().ok()
}
}