{"record":{"id":"ed0f3d442794f39f","repo":"LGUG2Z/komorebi","slug":"could-not-find-autohotkey-please-make-sure-it-is","errorCode":null,"errorMessage":"could not find autohotkey, please make sure it is installed before using the --ahk flag","messagePattern":"could not find autohotkey, please make sure it is installed before using the --ahk flag","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"komorebic/src/main.rs","lineNumber":2386,"sourceCode":"                && which(&komorebi_ahk_exe).is_ok()\n            {\n                ahk = komorebi_ahk_exe;\n            }\n\n            if args.whkd && which(\"whkd\").is_err() {\n                bail!(\n                    \"could not find whkd, please make sure it is installed before using the --whkd flag\"\n                );\n            }\n\n            if args.masir && which(\"masir\").is_err() {\n                bail!(\n                    \"could not find masir, please make sure it is installed before using the --masir flag\"\n                );\n            }\n\n            if args.ahk && which(&ahk).is_err() {\n                bail!(\n                    \"could not find autohotkey, please make sure it is installed before using the --ahk flag\"\n                );\n            }\n\n            let mut buf: PathBuf;\n\n            // The komorebi.ps1 shim will only exist in the Path if installed by Scoop\n            let exec =\n                if let Ok(output) = Command::new(\"where.exe\").arg(\"komorebi.ps1\").output() {\n                    let stdout = String::from_utf8(output.stdout)?;\n                    match stdout.trim() {\n                        \"\" => None,\n                        // It's possible that a komorebi.ps1 config will be in %USERPROFILE% - ignore this\n                        stdout if !stdout.contains(\"scoop\") => None,\n                        stdout => {\n                            buf = PathBuf::from(stdout);\n                            buf.pop(); // %USERPROFILE%\\scoop\\shims\n                            buf.pop(); // %USERPROFILE%\\scoop","sourceCodeStart":2368,"sourceCodeEnd":2404,"githubUrl":"https://github.com/LGUG2Z/komorebi/blob/e0709f02bfae4e503bf4640f58ee75ecbbfdbb97/komorebic/src/main.rs#L2368-L2404","documentation":"Thrown during komorebic's pre-flight checks when --ahk was passed but the AutoHotkey executable (defaulting to autohotkey.exe, overridable via KOMOREBI_AHK_EXE) cannot be found via `which`. Generic guard: the missing input is either autohotkey.exe on PATH or the binary named by KOMOREBI_AHK_EXE; komorebic refuses to start a companion it cannot locate.","triggerScenarios":"Thrown at komorebic/src/main.rs:2386 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install AutoHotkey v1.x and ensure autohotkey.exe is on PATH","If a custom binary is intended, set KOMOREBI_AHK_EXE to its full path and confirm the file exists","Drop the --ahk flag if AutoHotkey integration is not required"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e0709f02bfae4e503bf4640f58ee75ecbbfdbb97","analyzedAt":"2026-09-06T07:08:05.107Z","contentChangedAt":"2026-09-06T07:08:05.107Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}