komplian 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,8 +129,24 @@ function logGhIdentity() {
129
129
  }
130
130
 
131
131
  function cmdExists(name) {
132
- const r = spawnSync(name, ["--version"], { stdio: "ignore" });
133
- return !r.error;
132
+ const pathEnv = process.env.PATH || process.env.Path || "";
133
+ const isWin = process.platform === "win32";
134
+ const sep = isWin ? ";" : ":";
135
+ const dirs = pathEnv.split(sep).filter(Boolean);
136
+ const exts = isWin
137
+ ? ["", ...(process.env.PATHEXT || ".COM;.EXE;.BAT;.CMD").split(";")]
138
+ : [""];
139
+ for (const dir of dirs) {
140
+ for (const ext of exts) {
141
+ try {
142
+ const full = join(dir, name + ext);
143
+ if (existsSync(full) && statSync(full).isFile()) return true;
144
+ } catch {
145
+ continue;
146
+ }
147
+ }
148
+ }
149
+ return false;
134
150
  }
135
151
 
136
152
  function needCmd(name, hint = "") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "komplian",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Komplian developer workspace setup: GitHub CLI (browser login) + git clone by team. Node 18+, git, gh — no OAuth App to register.",
5
5
  "type": "module",
6
6
  "engines": {