Skip to content

Commit 75988e8

Browse files
committed
Fix login argument handling
1 parent b374e63 commit 75988e8

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/login.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@ export const loginCommand = defineCommand({
2222
if (ctx.rawArgs.length > 0) {
2323
const invalidArgs = [];
2424

25-
for (const arg of ctx.rawArgs) {
26-
const argName = arg.split(' ')[0]?.split('=')[0];
27-
if (!argName || argName === '--access-key-id' || argName === '--access-key-secret') {
25+
for (const arg of Object.keys(ctx.args)) {
26+
if (
27+
arg === '_' ||
28+
arg === 'access-key-id' ||
29+
arg === 'access-key-secret' ||
30+
arg === 'accessKeyId' ||
31+
arg === 'accessKeySecret'
32+
) {
2833
continue;
2934
}
30-
invalidArgs.push(argName);
35+
invalidArgs.push(arg);
3136
}
3237

3338
if (invalidArgs.length > 0) {

0 commit comments

Comments
 (0)