aboutsummaryrefslogtreecommitdiff
path: root/src/integration/targets.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/integration/targets.rs')
-rw-r--r--src/integration/targets.rs17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/integration/targets.rs b/src/integration/targets.rs
index 5d5e730c..488b7032 100644
--- a/src/integration/targets.rs
+++ b/src/integration/targets.rs
@@ -39,10 +39,11 @@ use super::{
HERMES_PLUGIN_INIT_INSTALL_NAME, HERMES_PLUGIN_MANIFEST_ASSET,
HERMES_PLUGIN_MANIFEST_INSTALL_NAME, KILO_PLUGIN_ASSET, KILO_PLUGIN_INSTALL_NAME,
KIMI_HOOK_ASSET, KIMI_HOOK_INSTALL_NAME, MASTRACODE_HOOK_ASSET, MASTRACODE_HOOK_EVENTS,
- MASTRACODE_HOOK_INSTALL_NAME, MASTRACODE_HOOK_TIMEOUT_MS, OMP_EXTENSION_ASSET,
- OMP_EXTENSION_INSTALL_NAME, OPENCODE_PLUGIN_ASSET, OPENCODE_PLUGIN_INSTALL_NAME,
- PI_EXTENSION_ASSET, PI_EXTENSION_INSTALL_NAME, QODERCLI_HOOK_ASSET, QODERCLI_HOOK_EVENTS,
- QODERCLI_HOOK_INSTALL_NAME, QODERCLI_REMOVED_LIFECYCLE_HOOK_EVENTS,
+ MASTRACODE_HOOK_INSTALL_NAME, MASTRACODE_HOOK_TIMEOUT_MS, MASTRACODE_REMOVED_HOOK_EVENTS,
+ OMP_EXTENSION_ASSET, OMP_EXTENSION_INSTALL_NAME, OPENCODE_PLUGIN_ASSET,
+ OPENCODE_PLUGIN_INSTALL_NAME, PI_EXTENSION_ASSET, PI_EXTENSION_INSTALL_NAME,
+ QODERCLI_HOOK_ASSET, QODERCLI_HOOK_EVENTS, QODERCLI_HOOK_INSTALL_NAME,
+ QODERCLI_REMOVED_LIFECYCLE_HOOK_EVENTS,
};
fn ensure_extension_dir(dir: &Path, agent: &str) -> io::Result<()> {
@@ -1133,6 +1134,9 @@ pub(crate) fn install_mastracode() -> io::Result<MastracodeInstallPaths> {
})?;
let quoted_hook_path = shell_single_quote(&hook_path.display().to_string());
+ for (event, action) in MASTRACODE_REMOVED_HOOK_EVENTS {
+ remove_flat_command_hook(hooks, event, &format!("bash {quoted_hook_path} {action}"))?;
+ }
for (event, action) in MASTRACODE_HOOK_EVENTS {
ensure_flat_command_hook(
hooks,
@@ -1171,7 +1175,10 @@ pub(crate) fn uninstall_mastracode() -> io::Result<MastracodeUninstallResult> {
})?;
let quoted_hook_path = shell_single_quote(&hook_path.display().to_string());
- for (event, action) in MASTRACODE_HOOK_EVENTS {
+ for (event, action) in MASTRACODE_HOOK_EVENTS
+ .into_iter()
+ .chain(MASTRACODE_REMOVED_HOOK_EVENTS)
+ {
updated_hooks |= remove_flat_command_hook(
hooks,
event,