Skip to content

Commit

Permalink
fix: accept --api-key flag for login (#70)
Browse files Browse the repository at this point in the history
Closes #52
  • Loading branch information
ps-kwang authored Apr 25, 2024
1 parent d11dfcb commit 0befc5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/login/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const login = command("login", {
args: args()
.tuple([z.string().describe("An API key to log in with.")])
.optional(),
}).run(async function* ({ args }) {
let apiKey: string | undefined = args[0];
}).run(async function* ({ args, flags }) {
let apiKey: string | undefined = args[0] ?? flags["api-key"];

if (!apiKey) {
try {
Expand Down

0 comments on commit 0befc5d

Please sign in to comment.