mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
build: fix alerts
This commit is contained in:
1 parent
d7412fcc1e
commit
14df7d7a05
3 files changed
+4
-3
No files matched your search
@@ -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';
|
||||
|
||||
@@ -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' });
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user