From 758cf9cd80a1c91a56f93b37ff675e73ea6f6325 Mon Sep 17 00:00:00 2001 From: ps-kwang <135043922+ps-kwang@users.noreply.github.com> Date: Wed, 24 Apr 2024 00:59:51 -0400 Subject: [PATCH] fix: accept `--api-key` flag for login Closes https://github.com/Paperspace/cli/issues/52 --- commands/login/mod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/login/mod.ts b/commands/login/mod.ts index a6a572a..167ff3f 100644 --- a/commands/login/mod.ts +++ b/commands/login/mod.ts @@ -26,7 +26,7 @@ export const login = command("login", { .tuple([z.string().describe("An API key to log in with.")]) .optional(), }).run(async function* ({ args }) { - let apiKey: string | undefined = args[0]; + let apiKey: string | undefined = args[0] ?? flags["api-key"]; if (!apiKey) { try {