@selesai/code 0.1.9 → 0.1.10
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.
|
@@ -63,6 +63,18 @@ export function resolveWindowsPiCliScript(deps: PiSpawnDeps = {}): string | unde
|
|
|
63
63
|
|
|
64
64
|
if (argv1) {
|
|
65
65
|
const argvPath = normalizePath(argv1);
|
|
66
|
+
// Resolve symlinks before checking the extension: a renamed fork like
|
|
67
|
+
// "selesai" is typically a symlink to dist/cli.js, so the raw argv1 has
|
|
68
|
+
// no .js extension and would otherwise fail the runnable-script check.
|
|
69
|
+
let resolved = argvPath;
|
|
70
|
+
try {
|
|
71
|
+
resolved = fs.realpathSync(argvPath);
|
|
72
|
+
} catch {
|
|
73
|
+
// realpath is best-effort; fall back to the raw path.
|
|
74
|
+
}
|
|
75
|
+
if (isRunnableNodeScript(resolved, existsSync)) {
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
66
78
|
if (isRunnableNodeScript(argvPath, existsSync)) {
|
|
67
79
|
return argvPath;
|
|
68
80
|
}
|