mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
chore: remove obsolete spawn leftovers
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user