Skip to content

Commit

Permalink
fix: check for source position when --show-params is set (#20682) (#2…
Browse files Browse the repository at this point in the history
…0689)

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
Co-authored-by: Soumya Ghosh Dastidar <44349253+gdsoumya@users.noreply.github.com>
  • Loading branch information
gcp-cherry-pick-bot[bot] and gdsoumya authored Nov 7, 2024
1 parent 347f221 commit 99aab9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/argocd/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com
})
errors.CheckError(err)

if app.Spec.HasMultipleSources() {
// check for source position if --show-params is set
if app.Spec.HasMultipleSources() && showParams {
if sourcePosition <= 0 {
errors.CheckError(fmt.Errorf("Source position should be specified and must be greater than 0 for applications with multiple sources"))
}
Expand Down

0 comments on commit 99aab9a

Please sign in to comment.