Add warning for why we don't log errors

This commit is contained in:
zkldi
2022-03-03 03:43:20 +00:00
parent 147f78171a
commit f9c162fc11
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -106,6 +106,20 @@ export class DatabaseSeedsRepo {
return false;
}
// Ok, Testing this is actually a bad idea. Hear me out.
// It's exceptionally difficult to actually store and look at the test output. (potentially huge)
// especially when filesystem size is our biggest constraint at the moment.
//
// It's better for us to commit straight away, and have the tests on our github CI fail
// (and subsequently yell at us.)
//
// try {
// await asyncExec(`cd "${this.baseDir}/scripts" || exit 2; pnpm install; pnpm test`);
// } catch ({ err, stdout, stderr }) {
// logger.error(`Testing the changes failed. ${err}. Not committing back!`, { err });
// throw err;
// }
this.logger.info(`Changes. Committing changes back.`);
const { stdout: commitOut } = await asyncExec(
+1 -1
View File
@@ -176,7 +176,7 @@ export function asyncExec(command: string) {
exec(command, (err, stdout, stderr) => {
if (err) {
// eslint-disable-next-line prefer-promise-reject-errors
return reject({ stdout, stderr, err });
return reject({ err, stdout, stderr });
}
return resolve({ stdout, stderr });