From 3035c4bc1b82ce9deafe3a5fdf5bea723c43dadd Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 23 Jul 2024 19:25:17 +0800 Subject: [PATCH] install: disable yarn update check --- install/install.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/install.ts b/install/install.ts index 2459aa204..2358ae41c 100644 --- a/install/install.ts +++ b/install/install.ts @@ -323,6 +323,7 @@ ${nixConfBase}`); exec('nix-channel --update', { stdio: 'inherit' }); }, 'nix-env -iA nixpkgs.pm2 nixpkgs.yarn nixpkgs.esbuild nixpkgs.bash nixpkgs.unzip nixpkgs.zip nixpkgs.diffutils nixpkgs.patch', + 'yarn config set disable-self-update-check true', async () => { const rl = createInterface(process.stdin, process.stdout); try { @@ -614,7 +615,9 @@ async function main() { let res = exec(op[0], { stdio: 'inherit' }); while (res.code && op[1].ignore !== true) { if (op[1].retry && retry < 30) { - log.warn('Retry... (%s)', op[0]); + log.warn('Retry in 3 secs... (%s)', op[0]); + // eslint-disable-next-line no-await-in-loop + await sleep(3000); res = exec(op[0], { stdio: 'inherit' }); retry++; } else log.fatal('Error when running %s', op[0]); @@ -624,7 +627,9 @@ async function main() { let res = await op[0](op[1]); while (res === 'retry') { if (retry < 30) { - log.warn('Retry...'); + log.warn('Retry in 3 secs...'); + // eslint-disable-next-line no-await-in-loop + await sleep(3000); // eslint-disable-next-line no-await-in-loop res = await op[0](op[1]); retry++;