88 RemovePluginQuestionSet ,
99} from '@app/unraid-api/cli/plugins/remove-plugin.questions.js' ;
1010import { RestartCommand } from '@app/unraid-api/cli/restart.command.js' ;
11+ import { ApiConfigPersistence } from '@app/unraid-api/config/api-config.module.js' ;
1112import { PluginManagementService } from '@app/unraid-api/plugin/plugin-management.service.js' ;
1213import { PluginService } from '@app/unraid-api/plugin/plugin.service.js' ;
1314import { parsePackageArg } from '@app/utils.js' ;
@@ -27,7 +28,8 @@ export class InstallPluginCommand extends CommandRunner {
2728 constructor (
2829 private readonly logService : LogService ,
2930 private readonly restartCommand : RestartCommand ,
30- private readonly pluginManagementService : PluginManagementService
31+ private readonly pluginManagementService : PluginManagementService ,
32+ private readonly apiConfigPersistence : ApiConfigPersistence
3133 ) {
3234 super ( ) ;
3335 }
@@ -45,6 +47,7 @@ export class InstallPluginCommand extends CommandRunner {
4547 await this . pluginManagementService . addPlugin ( ...passedParams ) ;
4648 this . logService . log ( `Added plugin ${ passedParams . join ( ', ' ) } ` ) ;
4749 }
50+ await this . apiConfigPersistence . persist ( ) ;
4851 if ( options . restart ) {
4952 await this . restartCommand . run ( ) ;
5053 }
@@ -84,7 +87,8 @@ export class RemovePluginCommand extends CommandRunner {
8487 private readonly logService : LogService ,
8588 private readonly pluginManagementService : PluginManagementService ,
8689 private readonly restartCommand : RestartCommand ,
87- private readonly inquirerService : InquirerService
90+ private readonly inquirerService : InquirerService ,
91+ private readonly apiConfigPersistence : ApiConfigPersistence
8892 ) {
8993 super ( ) ;
9094 }
@@ -114,6 +118,7 @@ export class RemovePluginCommand extends CommandRunner {
114118 for ( const plugin of options . plugins ) {
115119 this . logService . log ( `Removed plugin ${ plugin } ` ) ;
116120 }
121+ await this . apiConfigPersistence . persist ( ) ;
117122
118123 if ( options . restart ) {
119124 await this . restartCommand . run ( ) ;
0 commit comments