Skip to content

Commit b4ec9b0

Browse files
committed
try to fix plugin command
doesn't run rn
1 parent 1088012 commit b4ec9b0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

api/src/unraid-api/cli/plugins/plugin.command.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Injectable } from '@nestjs/common';
2+
13
import { Command, CommandRunner, Option, SubCommand } from 'nest-commander';
24

35
import { LogService } from '@app/unraid-api/cli/log.service.js';
@@ -109,14 +111,19 @@ export class ListPluginCommand extends CommandRunner {
109111
}
110112
}
111113

114+
@Injectable()
112115
@Command({
113116
name: 'plugins',
114117
description: 'Manage Unraid API plugins (peer dependencies)',
115118
subCommands: [InstallPluginCommand, RemovePluginCommand, ListPluginCommand],
116119
})
117120
export class PluginCommand extends CommandRunner {
118-
constructor() {
121+
constructor(private readonly logger: LogService) {
119122
super();
120123
}
121-
async run(): Promise<void> {}
124+
125+
async run(): Promise<void> {
126+
this.logger.info('Please provide a subcommand or use --help for more information');
127+
process.exit(0);
128+
}
122129
}

api/src/unraid-api/plugin/plugin-management.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export class PluginManagementService {
1515

1616
async addPlugin(plugin: string) {
1717
await execa('npm', ['run'], {
18+
stdio: 'inherit',
1819
cwd: path.join(process.cwd()),
1920
});
2021
}

0 commit comments

Comments
 (0)