diff --git a/files-widget/CHANGELOG.md b/files-widget/CHANGELOG.md index 958032e..4b7f583 100644 --- a/files-widget/CHANGELOG.md +++ b/files-widget/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this extension will be documented in this file. ## [Unreleased] +### Fixed +- Use `where` instead of `which` on Windows to detect `bat`, `delta`, and `glow`, so the dependency check works when running from PowerShell or cmd.exe. + ## [0.1.21] - 2026-05-07 ### Changed diff --git a/files-widget/utils.ts b/files-widget/utils.ts index 009cc90..04eca7c 100644 --- a/files-widget/utils.ts +++ b/files-widget/utils.ts @@ -2,7 +2,8 @@ import { execSync } from "node:child_process"; export function hasCommand(cmd: string): boolean { try { - execSync(`which ${cmd}`, { stdio: "ignore" }); + const checkCmd = process.platform === "win32" ? "where" : "which"; + execSync(`${checkCmd} ${cmd}`, { stdio: "ignore" }); return true; } catch { return false;