From 931da90f69ac711b12363a68fe23115f6683329d Mon Sep 17 00:00:00 2001 From: greysoh Date: Wed, 8 May 2024 11:53:40 -0400 Subject: [PATCH] chore: Adds better checking for argv. --- lom/src/commands/backends.ts | 2 ++ lom/src/commands/users.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lom/src/commands/backends.ts b/lom/src/commands/backends.ts index 453e65f..dae953f 100644 --- a/lom/src/commands/backends.ts +++ b/lom/src/commands/backends.ts @@ -9,6 +9,8 @@ export async function run( axios: Axios, apiKey: string, ) { + if (argv.length == 1) return println("error: no arguments specified! run %s --help to see commands.\n", argv[0]); + const program = new SSHCommand(println); program.description("Manages backends for NextNet"); program.version("v0.1.0-preprod"); diff --git a/lom/src/commands/users.ts b/lom/src/commands/users.ts index 4d6badf..f8e7f9e 100644 --- a/lom/src/commands/users.ts +++ b/lom/src/commands/users.ts @@ -21,6 +21,8 @@ export async function run( apiKey: string, readKeyboard: KeyboardRead ) { + if (argv.length == 1) return println("error: no arguments specified! run %s --help to see commands.\n", argv[0]); + const program = new SSHCommand(println); program.description("Manages users for NextNet"); program.version("v1.0.0-testing");