File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -896,6 +896,7 @@ export const cli = yargs
896896 } ,
897897 async ( opts ) => {
898898 const environmentOptions = await loadEnvironmentOptions ( opts ) ;
899+ const environment = currentEnvironment ( environmentOptions ) ;
899900
900901 shouldUseSecretAgent ( opts . agent ) ;
901902
@@ -924,7 +925,12 @@ export const cli = yargs
924925 throw new EmptyStdinOrPromptResponse ( 'Failed to read from stdin or prompt' ) ;
925926 }
926927
927- const decrypted = await decryptValue ( encryptedText , undefined , environmentOptions ) ;
928+ // only use an environment if one was provided - otherwise just find the key to use based on the revision
929+ const decrypted = await decryptValue (
930+ encryptedText ,
931+ undefined ,
932+ environment ? environmentOptions : undefined ,
933+ ) ;
928934
929935 process . stdout . write ( JSON . stringify ( decrypted ) ) ;
930936 process . stdout . write ( '\n' ) ;
You can’t perform that action at this time.
0 commit comments