Skip to content

Commit

Permalink
Merge pull request #332 from nosammai/env-raw
Browse files Browse the repository at this point in the history
Convert env subcommand to use ListRaw
  • Loading branch information
mckern committed Mar 28, 2023
2 parents 031ac90 + 2852850 commit 4f676ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func env(cmd *cobra.Command, args []string) error {
if err != nil {
return errors.Wrap(err, "Failed to get secret store")
}
secrets, err := secretStore.List(service, true)
rawSecrets, err := secretStore.ListRaw(service)
if err != nil {
return errors.Wrap(err, "Failed to list store contents")
}
Expand All @@ -54,10 +54,10 @@ func env(cmd *cobra.Command, args []string) error {
})
}

for _, secret := range secrets {
for _, rawSecret := range rawSecrets {
fmt.Printf("export %s=%s\n",
strings.ToUpper(key(secret.Meta.Key)),
shellescape(*secret.Value))
strings.ToUpper(key(rawSecret.Key)),
shellescape(rawSecret.Value))
}

return nil
Expand Down

0 comments on commit 4f676ab

Please sign in to comment.