MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / rollbackResolveField

Function rollbackResolveField

install/install.ts:318–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316}
317
318function rollbackResolveField() {
319 const yarnGlobalPath = exec('yarn global dir').output?.trim() || '';
320 if (!yarnGlobalPath) return false;
321 const pkgjson = `${yarnGlobalPath}/package.json`;
322 const data = JSON.parse(readFileSync(pkgjson, 'utf-8'));
323 delete data.resolutions;
324 writeFileSync(pkgjson, JSON.stringify(data, null, 2));
325 return true;
326}
327
328const mem = os.totalmem() / 1024 / 1024 / 1024; // In GiB
329// TODO: refuse to install if mem < 1.5

Callers 1

StepsFunction · 0.85

Calls 1

execFunction · 0.70

Tested by

no test coverage detected