gotta run

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2021-08-18 17:22:52 +02:00
parent 17adee54f4
commit 5554c72d9a
17 changed files with 156 additions and 42 deletions

View File

@@ -23,7 +23,12 @@ func Server(cfg *config.Config) *cli.Command {
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
cfg.Thumbnail.Resolutions = ctx.StringSlice("thumbnail-resolution")
// StringSliceFlag doesn't support Destination
// UPDATE Destination on string flags supported. Wait for https://github.com/urfave/cli/pull/1078 to get to micro/cli
if len(ctx.StringSlice("thumbnail-resolution")) > 0 {
cfg.Thumbnail.Resolutions = ctx.StringSlice("thumbnail-resolution")
}
if !cfg.Supervised {
return ParseConfig(ctx, cfg)