devspace-sh / devspace

DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
https://devspace.sh
Apache License 2.0
4.22k stars 353 forks source link

get_flag prints double value if var is defined #2464

Open pratikjagrut opened 1 year ago

pratikjagrut commented 1 year ago

What happened? get_flag should print the value of the flag once.

What did you expect to happen instead? get_flag prints the value of the flag twice.

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

version: v2beta1
name: double-flag

profiles:
  - name: local
  - name: test

pipelines:
  deploy:
    run: |-
      echo $(get_flag "profile")
      echo $(get_flag "force-deploy")
vars:
  DEVSPACE_FLAGS: --namespace double-flag
$ devspace deploy --profile local --profile test
local test local test
false
FabianKramm commented 1 year ago

@pratikjagrut thanks for the issue! Might be because deploy is calling run-pipeline internally