Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

fix(browser): use target-platform path grammar in findOnPath

Saim Shafique37a0bb67de59
diff --git a/archify.zip b/archify.zip
index 776666e0..cfd1d20b 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/bin/visual-check.mjs b/archify/bin/visual-check.mjs
index 8b40aa97..af9542d4 100644
--- a/archify/bin/visual-check.mjs
+++ b/archify/bin/visual-check.mjs
@@ -1292,7 +1292,11 @@ function executable(file, platform = process.platform) {
}
function findOnPath(command, env, platform, resolveExecutable) {
- const pathApi = platform === 'win32' ? path.win32 : path;
+ // Use the target platform's path grammar, not the host's: these candidates
+ // are checked through an injected platform (see the findChrome tests), and
+ // the host `path` object on Windows would join POSIX directories with
+ // backslashes and split PATH on ';'.
+ const pathApi = platform === 'win32' ? path.win32 : path.posix;
const directories = String(env.PATH || '').split(pathApi.delimiter).filter(Boolean);
const extensions = platform === 'win32'
? String(env.PATHEXT || '.EXE;.CMD;.BAT;.COM').split(';').filter(Boolean)