fraim 2.0.287 → 2.0.288
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.
|
@@ -97,6 +97,27 @@ async function runAgentCliHealthCheck(cli) {
|
|
|
97
97
|
: managedPath === ambientPath
|
|
98
98
|
? ambientVersion
|
|
99
99
|
: probeVersion(managedPath);
|
|
100
|
+
// Issue #1412: a resolved file that fails to execute at all (e.g. an
|
|
101
|
+
// interrupted update left a non-executable fallback launcher) is a harder
|
|
102
|
+
// failure than drift — `getSystemCommandPath()` only proves the file
|
|
103
|
+
// exists, not that it can run. Without this check, a single broken install
|
|
104
|
+
// with nothing else on PATH to disagree with (ambientPath === managedPath,
|
|
105
|
+
// both versions null) falls straight through the mismatch check below and
|
|
106
|
+
// reads as "consistent". Check this before computing npm-global/drift
|
|
107
|
+
// details that don't matter once the CLI can't run at all.
|
|
108
|
+
const brokenPath = ambientPath && !ambientVersion
|
|
109
|
+
? ambientPath
|
|
110
|
+
: managedPath && !managedVersion
|
|
111
|
+
? managedPath
|
|
112
|
+
: null;
|
|
113
|
+
if (brokenPath) {
|
|
114
|
+
return {
|
|
115
|
+
status: 'error',
|
|
116
|
+
message: `${cli.label} is installed at ${brokenPath} but failed to run (\`${cli.command} --version\` produced no output). An interrupted or partial update may have left a non-functional launcher.`,
|
|
117
|
+
suggestion: `Reinstall ${cli.label}, then run "${cli.command} --version" again to confirm it's fixed.`,
|
|
118
|
+
details: { ambientPath, ambientVersion, managedPath, managedVersion },
|
|
119
|
+
};
|
|
120
|
+
}
|
|
100
121
|
const npmGlobalBinDirs = (0, managed_agent_paths_1.resolveNpmGlobalBinDirs)();
|
|
101
122
|
const npmGlobalPath = npmGlobalBinDirs.length > 0
|
|
102
123
|
? (0, command_resolution_1.getSystemCommandPath)(cli.command, npmGlobalBinDirs.join(path_1.default.delimiter))
|