fix(cli,daemon,snmp): normalize CLI argument parsing and extract daemon monitoring helpers with stronger SNMP typing
This commit is contained in:
@@ -124,7 +124,7 @@ export class GroupHandler {
|
||||
await this.nupst.getDaemon().loadConfig();
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
'No configuration found. Please run "nupst setup" first to create a configuration.',
|
||||
'No configuration found. Please run "nupst ups add" first to create a configuration.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ export class GroupHandler {
|
||||
await this.nupst.getDaemon().loadConfig();
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
'No configuration found. Please run "nupst setup" first to create a configuration.',
|
||||
'No configuration found. Please run "nupst ups add" first to create a configuration.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ export class GroupHandler {
|
||||
await this.nupst.getDaemon().loadConfig();
|
||||
} catch (error) {
|
||||
logger.error(
|
||||
'No configuration found. Please run "nupst setup" first to create a configuration.',
|
||||
'No configuration found. Please run "nupst ups add" first to create a configuration.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -484,7 +484,7 @@ export class GroupHandler {
|
||||
prompt: (question: string) => Promise<string>,
|
||||
): Promise<void> {
|
||||
if (!config.upsDevices || config.upsDevices.length === 0) {
|
||||
logger.log('No UPS devices available. Use "nupst add" to add UPS devices.');
|
||||
logger.log('No UPS devices available. Use "nupst ups add" to add UPS devices.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user