chore: remove obsolete spawn leftovers

This commit is contained in:
weishu
2026-05-21 14:25:10 +08:00
parent b79f50f815
commit 7d5a5ee919
3 changed files with 0 additions and 35 deletions
-17
View File
@@ -211,23 +211,6 @@ export async function isRunnerRunningCurrentlyInstalledHappyVersion(): Promise<b
runnerStartedWithMachineId: state.startedWithMachineId
});
return currentIdentityMatches;
// PREVIOUS IMPLEMENTATION - Keeping this commented in case we need it
// Kirill does not understand how the upgrade of npm packages happen and whether
// we will get a new path or not when hapi is upgraded globally.
// If reading package.json doesn't work correctly after npm upgrades,
// we can revert to spawning a process (but should add timeout and cleanup!)
/*
const { spawnHappyCLI } = await import('@/utils/spawnHappyCLI');
const happyProcess = spawnHappyCLI(['--version'], { stdio: 'pipe' });
let version: string | null = null;
happyProcess.stdout?.on('data', (data) => {
version = data.toString().trim();
});
await new Promise(resolve => happyProcess.stdout?.on('close', resolve));
logger.debug(`[RUNNER CONTROL] Current CLI version: ${version}, Runner started with version: ${state.startedWithCliVersion}`);
return version === state.startedWithCliVersion;
*/
} catch (error) {
logger.debug('[RUNNER CONTROL] Error checking runner version', error);
return false;