Closed matskiv closed 2 years ago
I had a quick look at the code.
The info message in question gets printed by configLoader.SetDevSpaceRoot()
that's called from cmd.getCommands()
here - https://github.com/loft-sh/devspace/blob/a5eac169596719ace76d4824fb8e1b085581dc25/cmd/run.go#L206
I couldn't quickly come up with an elegant solution that would preserve all other functionality, so I'll probably leave this to folks more familiar with the code base. :)
What happened? Running
source <(devspace completion bash)
causes the error below:This happens when one of the parent folders of the current working directory contains a devspace.yaml file. For me, this happens when I open a new tab or split a terminal in my terminal emulator while in a subfolder of a project that uses devspace.
What did you expect to happen instead? Not printing
[info] Using devspace config in ...
when running devspace completion, and thus no error message.How can we reproduce the bug? (as minimally and precisely as possible)
You will see
[info] Using devspace config in /tmp/test
printed. Instead, you should see something like# bash completion for devspace ...
Local Environment:
Workaround:
source <(devspace completion bash | grep -v -e "Using devspace config in")
/kind bug