Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix: support Windows runtime scanning with `where` command

Gener200f05df09bf
diff --git a/src/cli/commands/register.ts b/src/cli/commands/register.ts
index e6623e066..d2e504baf 100644
--- a/src/cli/commands/register.ts
+++ b/src/cli/commands/register.ts
@@ -26,7 +26,8 @@ interface ActivateResponse {
function isCommandAvailable(cmd: string): boolean {
try {
- execSync(`which ${cmd}`, { stdio: "ignore" });
+ const check = process.platform === "win32" ? `where ${cmd}` : `which ${cmd}`;
+ execSync(check, { stdio: "ignore" });
return true;
} catch {
return false;
diff --git a/src/cli/daemon/daemon.ts b/src/cli/daemon/daemon.ts
index a5e1645aa..820308f64 100644
--- a/src/cli/daemon/daemon.ts
+++ b/src/cli/daemon/daemon.ts
@@ -32,7 +32,8 @@ interface RuntimeData {
function isCommandAvailable(cmd: string): boolean {
try {
- execSync(`which ${cmd}`, { stdio: "ignore" });
+ const check = process.platform === "win32" ? `where ${cmd}` : `which ${cmd}`;
+ execSync(check, { stdio: "ignore" });
return true;
} catch {
return false;