mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
Hello yarn berry
This commit is contained in:
1 parent
04a4306895
commit
782f334a27
62 files changed
+448
-239
No files matched your search
+3
-3
@@ -5,7 +5,7 @@ const path = require('path');
|
||||
const cluster = require('cluster');
|
||||
const fs = require('fs-extra');
|
||||
const { filter } = require('lodash');
|
||||
const { argv } = require('yargs');
|
||||
const argv = require('cac')().parse();
|
||||
const hydro = require('hydrooj');
|
||||
|
||||
if (!cluster.isMaster) {
|
||||
@@ -24,7 +24,7 @@ if (!cluster.isMaster) {
|
||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||
|
||||
try {
|
||||
const ui = argv.ui || '@hydrooj/ui-default';
|
||||
const ui = argv.options.ui || '@hydrooj/ui-default';
|
||||
require.resolve(ui);
|
||||
addons = [ui, ...addons];
|
||||
} catch (e) {
|
||||
@@ -33,7 +33,7 @@ if (!cluster.isMaster) {
|
||||
|
||||
addons = Array.from(new Set(addons));
|
||||
for (const addon of addons) hydro.addon(addon);
|
||||
(argv._[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
|
||||
(argv.args[0] === 'cli' ? hydro.loadCli : hydro.load)().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user