fix(cli): Correct scripts subcommand argument parsing and bump smartcli dependency

This commit is contained in:
2025-10-28 12:36:50 +00:00
parent ef7bab3e32
commit 33609bff9a
4 changed files with 12 additions and 6 deletions

View File

@@ -204,7 +204,7 @@ export const runCli = async () => {
// Scripts management commands
smartcliInstance.addCommand('scripts').subscribe(async (argvArg) => {
const subcommand = argvArg._[0];
const subcommand = argvArg._[1]; // _[0] is 'scripts', _[1] is the subcommand
if (!subcommand) {
logger.log('info', 'MOXYTOOL Scripts - Proxmox Community Scripts Management');
@@ -262,7 +262,7 @@ export const runCli = async () => {
}
case 'search': {
const query = argvArg._[1];
const query = argvArg._[2]; // _[0]=scripts, _[1]=search, _[2]=query
if (!query) {
logger.log('error', 'Please provide a search query');
@@ -292,7 +292,7 @@ export const runCli = async () => {
}
case 'info': {
const slug = argvArg._[1];
const slug = argvArg._[2]; // _[0]=scripts, _[1]=info, _[2]=slug
if (!slug) {
logger.log('error', 'Please provide a script slug');
@@ -368,7 +368,7 @@ export const runCli = async () => {
}
case 'run': {
const slug = argvArg._[1];
const slug = argvArg._[2]; // _[0]=scripts, _[1]=run, _[2]=slug
if (!slug) {
logger.log('error', 'Please provide a script slug');