From 193c4616116a752965db269f00ab6693ee099059 Mon Sep 17 00:00:00 2001 From: Shirley Xiaolin Xu Date: Wed, 23 Feb 2022 13:20:26 -0500 Subject: [PATCH 1/2] scope requires app if scope is app --- internal/cli/config_set.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/cli/config_set.go b/internal/cli/config_set.go index c4262df927d..9ed08ca9f29 100644 --- a/internal/cli/config_set.go +++ b/internal/cli/config_set.go @@ -116,6 +116,10 @@ func (c *ConfigSetCommand) Run(args []string) int { } case "app": + if c.flagApp == "" { + fmt.Fprintf(os.Stderr, "-scope requires -app set if scope is 'app'") + return 1 + } configVar.Target.AppScope = &pb.ConfigVar_Target_Application{ Application: &pb.Ref_Application{ Project: projectRef.Project, From d0ee800b462cadf6a479c9bb8ae07ba23460f3be Mon Sep 17 00:00:00 2001 From: Shirley Xiaolin Xu Date: Wed, 23 Feb 2022 13:49:58 -0500 Subject: [PATCH 2/2] changelog --- .changelog/3040.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3040.txt diff --git a/.changelog/3040.txt b/.changelog/3040.txt new file mode 100644 index 00000000000..2a8f9774bce --- /dev/null +++ b/.changelog/3040.txt @@ -0,0 +1,3 @@ +```release-note:bug +cli: requires -app flag if `config set -scope=app` is set +```