From 2aab51684c48184da4bee3296755e1c393470f58 Mon Sep 17 00:00:00 2001 From: fritzduchardt Date: Mon, 11 Sep 2023 16:57:24 +0200 Subject: [PATCH] fix: consistent behavior on rendering ALL applications (#79) Co-authored-by: Fritz Durchardt --- cmd/root.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index ec7a1a62..a421e486 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -33,7 +33,7 @@ It supports prototype applications that can be shared between environments and i Myks supports two positional arguments: - A comma-separated list of environments to render. If you provide "ALL", all environments will be rendered. -- A comma-separated list of applications to render. If you provide "ALL", all applications will be rendered. +- A comma-separated list of applications to render. If you don't provide this argument or provide "ALL", all applications will be rendered. If you do not provide any positional arguments, myks will run in "Smart Mode". In Smart Mode, myks will only render environments and applications that have changed since the last run. `, @@ -75,7 +75,9 @@ If you do not provide any positional arguments, myks will run in "Smart Mode". I if onlyArgs[0] != "ALL" { targetEnvironments = strings.Split(onlyArgs[0], ",") } - targetApplications = strings.Split(onlyArgs[1], ",") + if onlyArgs[1] != "ALL" { + targetApplications = strings.Split(onlyArgs[1], ",") + } default: err := errors.New("Too many positional arguments") log.Error().Err(err).Msg("Unable to parse positional arguments")