mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 12:18:15 +08:00
fix: restart the application after updating the plugin
This commit is contained in:
parent
3e49ffb204
commit
91c24efd0b
@ -882,7 +882,8 @@ export class PluginManager {
|
||||
if (!(await this.app.isStarted())) {
|
||||
this.app.log.debug('app upgrading');
|
||||
await this.app.runCommand('upgrade');
|
||||
await execa('yarn', ['nocobase', 'refresh'], {
|
||||
await tsxRerunning();
|
||||
await execa('yarn', ['nocobase', 'pm2-restart'], {
|
||||
env: process.env,
|
||||
});
|
||||
return;
|
||||
@ -890,13 +891,10 @@ export class PluginManager {
|
||||
const file = resolve(process.cwd(), 'storage/app-upgrading');
|
||||
await fs.promises.writeFile(file, '', 'utf-8');
|
||||
// await this.app.upgrade();
|
||||
if (process.env.IS_DEV_CMD) {
|
||||
await tsxRerunning();
|
||||
} else {
|
||||
await execa('yarn', ['nocobase', 'pm2-restart'], {
|
||||
env: process.env,
|
||||
});
|
||||
}
|
||||
await tsxRerunning();
|
||||
await execa('yarn', ['nocobase', 'pm2-restart'], {
|
||||
env: process.env,
|
||||
});
|
||||
};
|
||||
if (Array.isArray(nameOrPkg)) {
|
||||
for (const name of nameOrPkg) {
|
||||
|
Loading…
Reference in New Issue
Block a user