Skip to content

Commit

Permalink
only use storage flags from cm
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Dolitsky <jdolitsky@gmail.com>
  • Loading branch information
jdolitsky committed Jan 13, 2019
1 parent 3c9f27c commit 27ebaad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/chart-scanner/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"os"
"strings"

"github.com/helm/chartmuseum/pkg/config"
"github.com/urfave/cli"
Expand All @@ -23,7 +24,13 @@ func main() {
app.Version = fmt.Sprintf("%s (build %s)", Version, Revision)
app.Usage = "checks a storage directory for evil charts"
app.Action = cliHandler
app.Flags = config.CLIFlags
var flags []cli.Flag
for _, flag := range config.CLIFlags {
if strings.HasPrefix(flag.GetName(), "storage") {
flags = append(flags, flag)
}
}
app.Flags = flags
app.Run(os.Args)
}

Expand Down

0 comments on commit 27ebaad

Please sign in to comment.