mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +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 { NumericDictionary, unionWith } from 'lodash';
|
||||||
import { FilterQuery, ObjectID } from 'mongodb';
|
import { FilterQuery, ObjectID } from 'mongodb';
|
||||||
import { ProblemDoc, Tdoc, Udoc } from '../interface';
|
import { ProblemDoc, Tdoc, Udoc } from '../interface';
|
||||||
import paginate from '../lib/paginate';
|
|
||||||
import rating from '../lib/rating';
|
import rating from '../lib/rating';
|
||||||
import { PRIV, STATUS } from '../model/builtin';
|
import { PRIV, STATUS } from '../model/builtin';
|
||||||
import * as contest from '../model/contest';
|
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) => {
|
const query = (q: string | mysql.Query): Promise<[values: any[], fields: mysql.FieldInfo[]]> => new Promise((res, rej) => {
|
||||||
src.query(q, (err, val, fields) => {
|
src.query(q, (err, val, fields) => {
|
||||||
if (err) rej(err);
|
if (err) rej(err);
|
||||||
res([val, fields]);
|
else res([val, fields]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
report({ message: 'Connected to database' });
|
report({ message: 'Connected to database' });
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ function runWebpack({
|
|||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.stack || err);
|
console.error(err.stack || err);
|
||||||
if (err.details) console.error(err.details);
|
if (err.details) console.error(err.details);
|
||||||
|
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
|
||||||
reject(err);
|
reject(err);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (argv.options.detail) console.log(stats.toString());
|
if (argv.options.detail) console.log(stats.toString());
|
||||||
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
|
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
|
||||||
@@ -50,7 +52,7 @@ function runWebpack({
|
|||||||
async function runGulp() {
|
async function runGulp() {
|
||||||
function handleError(err) {
|
function handleError(err) {
|
||||||
log(chalk.red('Error: %s'), chalk.reset(err.toString() + err.stack));
|
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 });
|
const gulpTasks = gulpConfig({ production: true, errorHandler: handleError });
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|||||||
Reference in new issue
Block a user