From 8c6bd13511c2798fdfa8159cf9161d33dcc61f72 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sun, 12 Nov 2023 18:20:05 -0800 Subject: [PATCH] fix(ahk): override derive-ahk output for stop cmd This commit adds a last-second override the string output of the derive-ahk proc macro for the stop command, which unfortunately ends up in a broken state in komorebic.lib.ahk with the addition of a 'whkd' flag in v0.1.19. fix #578 --- komorebic/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index b0516f80..0268207f 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -1181,7 +1181,10 @@ fn main() -> Result<()> { .open(library.clone())?; let output: String = SubCommand::generate_ahk_library(); - let fixed_output = output.replace("%id%", "\"%id%\""); + let fixed_id = output.replace("%id%", "\"%id%\""); + let fixed_stop_def = fixed_id.replace("Stop(whkd)", "Stop()"); + let fixed_output = + fixed_stop_def.replace("komorebic.exe stop --whkd %whkd%", "komorebic.exe stop"); file.write_all(fixed_output.as_bytes())?;