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
This commit is contained in:
LGUG2Z
2023-11-12 18:20:05 -08:00
parent ef61239580
commit 8c6bd13511

View File

@@ -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())?;