hooks : on_install/on_start/on_stop/on_update globaux (settings.hooks) et par projet (issue #34) - echec non bloquant, dry-run respecte, ordre global puis projet
This commit is contained in:
@@ -73,6 +73,10 @@ pub struct Settings {
|
||||
/// --theme flag overrides it).
|
||||
#[serde(default)]
|
||||
pub theme: Option<String>,
|
||||
/// Lifecycle hooks: on_install / on_start / on_stop / on_update command
|
||||
/// lines (global; project profiles can add their own).
|
||||
#[serde(default)]
|
||||
pub hooks: BTreeMap<String, Vec<String>>,
|
||||
}
|
||||
|
||||
/// A project profile: everything am needs to know about one project.
|
||||
@@ -497,6 +501,9 @@ pub fn merge(base: &mut Config, overlay: Config) {
|
||||
if o.self_update_repo.is_some() {
|
||||
s.self_update_repo = o.self_update_repo;
|
||||
}
|
||||
for (k, v) in o.hooks {
|
||||
s.hooks.insert(k, v);
|
||||
}
|
||||
for (k, v) in overlay.aliases {
|
||||
base.aliases.insert(k, v);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user