Skip to content

Commit ebd2513

Browse files
committed
fix
1 parent 489824a commit ebd2513

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/server/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ seatFile: /home/icpc/Desktop/seat.txt
3838
logger.error('Config file generated, please fill in the config.yaml');
3939
resolve();
4040
})());
41-
throw new Error();
41+
throw new Error('no-config');
4242
}
4343

4444
const serverSchema = Schema.object({

packages/server/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ fs.ensureDirSync(tmpdir);
1717
let config;
1818
try {
1919
config = require('./config').config;
20-
} catch (e) { }
20+
} catch (e) {
21+
if (e.message !== 'no-config') throw e;
22+
}
2123

2224
async function applyServer(ctx: Context) {
2325
ctx.plugin(await import('./service/server'));

0 commit comments

Comments
 (0)