mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
use findFile() api
This commit is contained in:
1 parent
8a8e312ca4
commit
9a538130ee
10 files changed
+105
-52
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ if (!cluster.isMaster) {
|
||||
fs.ensureDirSync(path.resolve(os.homedir(), '.hydro'));
|
||||
const addonPath = path.resolve(os.homedir(), '.hydro', 'addon.json');
|
||||
let addons = filter(
|
||||
fs.readdirSync(path.resolve(__dirname, '../packages')),
|
||||
fs.readdirSync(path.resolve(process.cwd(), 'packages')),
|
||||
(i) => i !== 'hydrooj',
|
||||
).map((i) => `@hydrooj/${i}`);
|
||||
fs.writeFileSync(addonPath, JSON.stringify(addons, null, 2));
|
||||
|
||||
Reference in new issue
Block a user