Skip to content

Commit

Permalink
Dev 1.6.0-dev.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Oct 13, 2024
1 parent 504cf28 commit e35813c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export class PluginManager {
}

async install(name: string): Promise<string | undefined> {
await this.uninstall(name);
this.log.info(`Installing plugin ${plg}${name}${nf}`);
return new Promise((resolve, reject) => {
exec(`npm install -g ${name} --omit=dev --force`, (error: ExecException | null, stdout: string, stderr: string) => {
Expand Down Expand Up @@ -457,7 +458,7 @@ export class PluginManager {
async uninstall(name: string): Promise<string | undefined> {
this.log.info(`Uninstalling plugin ${plg}${name}${nf}`);
return new Promise((resolve, reject) => {
exec(`npm uninstall -g ${name}`, (error: ExecException | null, stdout: string, stderr: string) => {
exec(`npm uninstall -g ${name} --force`, (error: ExecException | null, stdout: string, stderr: string) => {
if (error) {
this.log.error(`Failed to uninstall plugin ${plg}${name}${er}: ${error}`);
this.log.debug(`Failed to uninstall plugin ${plg}${name}${db}: ${stderr}`);
Expand Down

0 comments on commit e35813c

Please sign in to comment.