Skip to content

Commit

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

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
  • Loading branch information
gdsoumya authored Nov 6, 2024
1 parent 35b9158 commit 17c412e
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 @@ -382,7 +382,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 17c412e

Please sign in to comment.