@@ -77,7 +77,7 @@ export const secretsStoreStoreCreateCommand = createCommand({
7777 let store : { id : string } ;
7878 logger . log ( `🔐 Creating store... (Name: ${ args . name } )` ) ;
7979 if ( args . remote ) {
80- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
80+ const accountId = await getAccountId ( config ) ;
8181 store = await createStore ( config , accountId , { name : args . name } ) ;
8282 } else {
8383 throw new UserError (
@@ -112,7 +112,7 @@ export const secretsStoreStoreDeleteCommand = createCommand({
112112 async handler ( args , { config } ) {
113113 logger . log ( `🔐 Deleting store... (Name: ${ args . storeId } )` ) ;
114114 if ( args . remote ) {
115- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
115+ const accountId = await getAccountId ( config ) ;
116116 await deleteStore ( config , accountId , args . storeId ) ;
117117 } else {
118118 throw new UserError (
@@ -158,7 +158,7 @@ export const secretsStoreStoreListCommand = createCommand({
158158
159159 let stores : Store [ ] ;
160160 if ( args . remote ) {
161- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
161+ const accountId = await getAccountId ( config ) ;
162162 stores = await listStores ( config , accountId , urlParams ) ;
163163 } else {
164164 throw new UserError (
@@ -235,7 +235,7 @@ export const secretsStoreSecretListCommand = createCommand({
235235
236236 let secrets : Secret [ ] ;
237237 if ( args . remote ) {
238- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
238+ const accountId = await getAccountId ( config ) ;
239239 secrets = await listSecrets ( config , accountId , args . storeId , urlParams ) ;
240240 } else {
241241 secrets = (
@@ -313,7 +313,7 @@ export const secretsStoreSecretGetCommand = createCommand({
313313
314314 let secret : Secret ;
315315 if ( args . remote ) {
316- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
316+ const accountId = await getAccountId ( config ) ;
317317 secret = await getSecret ( config , accountId , args . storeId , args . secretId ) ;
318318 } else {
319319 const name = await usingLocalSecretsStoreSecretAPI (
@@ -421,7 +421,7 @@ export const secretsStoreSecretCreateCommand = createCommand({
421421
422422 let secrets : Secret [ ] ;
423423 if ( args . remote ) {
424- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
424+ const accountId = await getAccountId ( config ) ;
425425 secrets = await createSecret ( config , accountId , args . storeId , {
426426 name : args . name ,
427427 value : secretValue ,
@@ -548,7 +548,7 @@ export const secretsStoreSecretUpdateCommand = createCommand({
548548
549549 let secret : Secret ;
550550 if ( args . remote ) {
551- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
551+ const accountId = await getAccountId ( config ) ;
552552 secret = await updateSecret (
553553 config ,
554554 accountId ,
@@ -632,7 +632,7 @@ export const secretsStoreSecretDeleteCommand = createCommand({
632632 logger . log ( `🔐 Deleting secret... (ID: ${ args . secretId } )` ) ;
633633
634634 if ( args . remote ) {
635- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
635+ const accountId = await getAccountId ( config ) ;
636636 await deleteSecret ( config , accountId , args . storeId , args . secretId ) ;
637637 } else {
638638 await usingLocalSecretsStoreSecretAPI (
@@ -698,7 +698,7 @@ export const secretsStoreSecretDuplicateCommand = createCommand({
698698
699699 let duplicatedSecret : Secret ;
700700 if ( args . remote ) {
701- const accountId = config . account_id || ( await getAccountId ( config ) ) ;
701+ const accountId = await getAccountId ( config ) ;
702702 duplicatedSecret = await duplicateSecret (
703703 config ,
704704 accountId ,
0 commit comments