File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ class CommandGet extends CommandPolykey {
6464 ( auth ) => pkClient . grpcClient . vaultsSecretsGet ( secretMessage , auth ) ,
6565 meta ,
6666 ) ;
67+ const secretContent = Buffer . from ( response . getSecretContent_asU8 ( ) )
68+ . toString ( 'utf-8' )
69+ . trim ( ) ;
6770 if ( isEnv ) {
6871 process . stdout . write (
6972 binUtils . outputFormatter ( {
@@ -72,17 +75,15 @@ class CommandGet extends CommandPolykey {
7275 `Export ${ secretMessage
7376 . getSecretName ( )
7477 . toUpperCase ( )
75- . replace ( '-' , '_' ) } ='${ response . getSecretName ( ) } `,
78+ . replace ( '-' , '_' ) } ='${ secretContent } ' `,
7679 ] ,
7780 } ) ,
7881 ) ;
7982 } else {
8083 process . stdout . write (
8184 binUtils . outputFormatter ( {
8285 type : options . format === 'json' ? 'json' : 'list' ,
83- data : [
84- `${ secretMessage . getSecretName ( ) } :\t\t${ response . getSecretName ( ) } ` ,
85- ] ,
86+ data : [ `${ secretMessage . getSecretName ( ) } : ${ secretContent } ` ] ,
8687 } ) ,
8788 ) ;
8889 }
You can’t perform that action at this time.
0 commit comments