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
896
896
} ,
897
897
async ( opts ) => {
898
898
const environmentOptions = await loadEnvironmentOptions ( opts ) ;
899
+ const environment = currentEnvironment ( environmentOptions ) ;
899
900
900
901
shouldUseSecretAgent ( opts . agent ) ;
901
902
@@ -924,7 +925,12 @@ export const cli = yargs
924
925
throw new EmptyStdinOrPromptResponse ( 'Failed to read from stdin or prompt' ) ;
925
926
}
926
927
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
+ ) ;
928
934
929
935
process . stdout . write ( JSON . stringify ( decrypted ) ) ;
930
936
process . stdout . write ( '\n' ) ;
You can’t perform that action at this time.
0 commit comments