mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2024-12-22 21:52:35 -05:00
fix: use stdout instead of console
This commit is contained in:
parent
bc151d5ef8
commit
f298a58aeb
2 changed files with 2 additions and 4 deletions
|
@ -78,8 +78,7 @@ const txPull = async function (project, resource, locale, mode = 'default') {
|
||||||
buffer = await download(url);
|
buffer = await download(url);
|
||||||
return JSON.parse(buffer.toString());
|
return JSON.parse(buffer.toString());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// eslint-disable-next-line no-console
|
process.stdout.write(`got ${e.message}, retrying after ${i + 1} failed attempt(s)\n`);
|
||||||
console.error(`got ${e.message}, retrying after ${i + 1} failed attempt(s)`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw Error('failed to pull after 5 retries');
|
throw Error('failed to pull after 5 retries');
|
||||||
|
|
|
@ -63,8 +63,7 @@ const getLocaleData = async function (item) {
|
||||||
file: fileName
|
file: fileName
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// eslint-disable-next-line no-console
|
process.stdout.write(`got ${e.message}, retrying after ${i + 1} attempt(s)\n`);
|
||||||
console.error(`got ${e.message}, retrying after ${i + 1} attempts`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw Error('failed to pull translations after 5 retries');
|
throw Error('failed to pull translations after 5 retries');
|
||||||
|
|
Loading…
Reference in a new issue