build: fix alerts

This commit is contained in:
undefined committed 2021-09-15 17:36:56 +08:00
1 parent d7412fcc1e
commit 14df7d7a05
3 files changed
+4 -3

No files matched your search

-1
View File
@@ -2,7 +2,6 @@
import { NumericDictionary, unionWith } from 'lodash';
import { FilterQuery, ObjectID } from 'mongodb';
import { ProblemDoc, Tdoc, Udoc } from '../interface';
import paginate from '../lib/paginate';
import rating from '../lib/rating';
import { PRIV, STATUS } from '../model/builtin';
import * as contest from '../model/contest';
+1 -1
View File
@@ -20,7 +20,7 @@ export async function run({
const query = (q: string | mysql.Query): Promise<[values: any[], fields: mysql.FieldInfo[]]> => new Promise((res, rej) => {
src.query(q, (err, val, fields) => {
if (err) rej(err);
res([val, fields]);
else res([val, fields]);
});
});
report({ message: 'Connected to database' });
+3 -1
View File
@@ -36,7 +36,9 @@ function runWebpack({
if (err) {
console.error(err.stack || err);
if (err.details) console.error(err.details);
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
reject(err);
return;
}
if (argv.options.detail) console.log(stats.toString());
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
@@ -50,7 +52,7 @@ function runWebpack({
async function runGulp() {
function handleError(err) {
log(chalk.red('Error: %s'), chalk.reset(err.toString() + err.stack));
if (err) process.exit(1);
process.exit(1);
}
const gulpTasks = gulpConfig({ production: true, errorHandler: handleError });
return new Promise((resolve) => {