mirror of https://github.com/perkeep/perkeep.git
cmd/pk: strip knownKeys from dumpconfig
Fixes #1204 Change-Id: If463b84d8250ed1b0f48e6ed24b7d37843f082cb
This commit is contained in:
parent
2453859515
commit
e6dd735c20
|
@ -21,6 +21,7 @@ import (
|
|||
"errors"
|
||||
"flag"
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
"perkeep.org/internal/osutil"
|
||||
_ "perkeep.org/internal/osutil/gce"
|
||||
|
@ -61,6 +62,8 @@ func (c *dumpconfigCmd) RunCommand(args []string) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
knownKeys := regexp.MustCompile(`(?ms)^\s+"_knownkeys": {.+?},?\n`)
|
||||
lowj = knownKeys.ReplaceAll(lowj, nil)
|
||||
_, err = os.Stdout.Write(lowj)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue