mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
gitpod support
This commit is contained in:
1 parent
8b5107fefa
commit
539b47d55b
5 files changed
+20
-5
No files matched your search
+2
-1
@@ -9,7 +9,7 @@ const hydro = require('../dist/loader');
|
||||
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
||||
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
||||
if (!fs.existsSync(addonPath)) fs.writeFileSync(addonPath, '[]');
|
||||
const addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
||||
let addons = JSON.parse(fs.readFileSync(addonPath).toString());
|
||||
|
||||
try {
|
||||
const ui = argv.ui || '@hydrooj/ui-default';
|
||||
@@ -33,6 +33,7 @@ if (argv._[0]) {
|
||||
}
|
||||
}
|
||||
}
|
||||
addons = Array.from(new Set(addons));
|
||||
console.log('Current Addons: ', addons);
|
||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user