@syntax-syllogism/aloop 0.6.1 → 0.6.2
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.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/command.mjs +17 -3
package/CHANGELOG.md
CHANGED
|
@@ -183,6 +183,12 @@ History from before the standalone extraction (changesets format), preserved for
|
|
|
183
183
|
- Prompts ship with the package and are overridable per phase from
|
|
184
184
|
`.loop/prompts/` in the consuming project.
|
|
185
185
|
|
|
186
|
+
## [0.6.2] - 2026-09-16
|
|
187
|
+
|
|
188
|
+
### Fixed
|
|
189
|
+
|
|
190
|
+
- Resolve Windows executables to correct on-disk casing
|
|
191
|
+
|
|
186
192
|
## [0.5.2] - 2026-09-13
|
|
187
193
|
|
|
188
194
|
### Changed
|
package/package.json
CHANGED
package/src/command.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
|
-
import { existsSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { existsSync, realpathSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { win32 as windowsPath } from 'node:path';
|
|
4
4
|
|
|
5
5
|
export function signalProcessGroup(pid, signal, {
|
|
@@ -63,7 +63,10 @@ function environmentValue(env, name) {
|
|
|
63
63
|
return key ? env[key] : undefined;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
export function resolveWindowsExecutable(command, env = process.env, {
|
|
66
|
+
export function resolveWindowsExecutable(command, env = process.env, {
|
|
67
|
+
fileExists = existsSync,
|
|
68
|
+
realPath = realpathSync.native,
|
|
69
|
+
} = {}) {
|
|
67
70
|
const pathEntries = (environmentValue(env, 'PATH') ?? '').split(';').filter(Boolean);
|
|
68
71
|
const pathExtensions = (environmentValue(env, 'PATHEXT') ?? WINDOWS_EXECUTABLE_EXTENSIONS.join(';'))
|
|
69
72
|
.split(';')
|
|
@@ -76,7 +79,18 @@ export function resolveWindowsExecutable(command, env = process.env, { fileExist
|
|
|
76
79
|
for (const base of bases) {
|
|
77
80
|
for (const extension of extensions) {
|
|
78
81
|
const candidate = `${base}${extension}`;
|
|
79
|
-
|
|
82
|
+
// Candidates are assembled from PATHEXT, which is upper-cased by convention
|
|
83
|
+
// (".EXE"), while the file on disk is usually "git.exe". existsSync matches
|
|
84
|
+
// case-insensitively, so a match here would otherwise be handed to spawn with
|
|
85
|
+
// the wrong casing — which fails with ENOENT under Git Bash / MSYS. Canonicalize
|
|
86
|
+
// to the real on-disk path so spawn receives the name that actually exists.
|
|
87
|
+
if (fileExists(candidate)) {
|
|
88
|
+
try {
|
|
89
|
+
return realPath(candidate);
|
|
90
|
+
} catch {
|
|
91
|
+
return candidate;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
80
94
|
}
|
|
81
95
|
}
|
|
82
96
|
return null;
|