Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'dev' (v0.3.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabalde committed Dec 28, 2019
2 parents 9cc1c3d + 6dcdb03 commit 5f7b174
Show file tree
Hide file tree
Showing 5 changed files with 196 additions and 64 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
- v? (?):
+ ...

- v0.3.9 (2019-12-28):
+ Add JSON output to 'list' command.

- v0.3.8 (2019-12-26):
+ Add some disgraceful fixes.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.3.8
0.3.9
14 changes: 9 additions & 5 deletions cmd/pgp-tomb/pgp-tomb.go
Expand Up @@ -320,8 +320,8 @@ func main() {
cmdRebuildForce, cmdRebuildDryRun)
},
}
cmdRebuild.PersistentFlags().StringVar(
&cmdRebuildQuery, "query", "",
cmdRebuild.PersistentFlags().StringVarP(
&cmdRebuildQuery, "query", "q", "",
"limit rebuild to secrets matching this query")
cmdRebuild.PersistentFlags().StringVar(
&cmdRebuildRecipient, "recipient", "",
Expand All @@ -341,6 +341,7 @@ func main() {
var cmdListQuery string
var cmdListRecipient string
var cmdListIgnoreSchema bool
var cmdListJson bool
cmdList := &cobra.Command{
Use: "list [<folder>|<secret URI>]",
Short: "List secrets",
Expand All @@ -358,21 +359,24 @@ func main() {
}
core.List(
folderOrUri, cmdListLong, cmdListQuery, cmdListRecipient,
cmdListIgnoreSchema)
cmdListIgnoreSchema, cmdListJson)
},
}
cmdList.PersistentFlags().BoolVarP(
&cmdListLong, "long", "l", false,
"list using the long format (requires decryption for schema validation)")
cmdList.PersistentFlags().StringVar(
&cmdListQuery, "query", "",
cmdList.PersistentFlags().StringVarP(
&cmdListQuery, "query", "q", "",
"limit listing to secrets matching this query")
cmdList.PersistentFlags().StringVar(
&cmdListRecipient, "recipient", "",
"limit listing to secrets readable by this key alias (defaults to --identity)")
cmdList.PersistentFlags().BoolVar(
&cmdListIgnoreSchema, "ignore-schema", false,
"skip schema validations, both for tags and secrets")
cmdList.PersistentFlags().BoolVarP(
&cmdListJson, "json", "j", false,
"enable JSON output")

// 'init' command.
cmdInit := &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions internal/core/edit.go
Expand Up @@ -112,8 +112,8 @@ func editTags(s *secret.Secret) {
for _, tag := range s.GetTags() {
if _, err := fmt.Fprintf(output, "%s: %s\n", tag.Name, tag.Value); err != nil {
logrus.WithFields(logrus.Fields{
"file": output.Name(),
"error": err,
"file": output.Name(),
"error": err,
}).Fatal("Failed to dump tags!")
}
}
Expand All @@ -124,8 +124,8 @@ func editTags(s *secret.Secret) {
items, err := ioutil.ReadFile(output.Name())
if err != nil {
logrus.WithFields(logrus.Fields{
"file": output.Name(),
"error": err,
"file": output.Name(),
"error": err,
}).Fatal("Failed to load tags!")
}
tags := make([]secret.Tag, 0)
Expand Down

0 comments on commit 5f7b174

Please sign in to comment.