mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: bug fix
This commit is contained in:
1 parent
90528f15d1
commit
52cdd166aa
2 files changed
+2
-1
No files matched your search
@@ -167,6 +167,7 @@ if (!argv.args[0] || argv.args[0] === 'cli') {
|
||||
} else throw new Error(`Unsupported install source: ${src}`);
|
||||
if (!newAddonPath) throw new Error('Addon download failed');
|
||||
console.log('Installing depedencies');
|
||||
if (!fs.existsSync(path.join(newAddonPath, 'package.json'))) throw new Error('Invalid plugin file');
|
||||
child.execSync('yarn --production', { stdio: 'inherit', cwd: newAddonPath });
|
||||
child.execSync(`hydrooj addon add '${newAddonPath}'`);
|
||||
fs.writeFileSync(path.join(newAddonPath, '__metadata__'), JSON.stringify({
|
||||
|
||||
Reference in new issue
Block a user