Closed MathiasVandePol closed 1 year ago
@MathiasVandePol thanks for creating this issue! We'll take a look and fix the issue!
Hi @MathiasVandePol You can use the following option to skip the question:
vars:
ANIMAL:
alwaysResolve: false
question: Which type of animal are you
options:
- "cat"
- "dog"
But as long as you use this variable in activation the question will be asked.
You could also use the default option to skip questions:
version: v2beta1
name: test
vars:
ANIMAL:
question: Which type of animal are you
default: cat
options:
- "cat"
- "dog"
commands:
test-command:
command: "echo 'hi'"
Note:
If you use DevSpace, not in a Terminal e.g. echo 123 | devspace run test-command
, the default value should be used, if no default is defined then it should print an error. But currently, this scenario is not working. We're working on a fix.
I have a var set
and a profile (this is optional, also fails without)
When running a command ex:
devspace run 'somecommand'
it will try to use the question variable which fails as commands are not being run in a terminalWhat happened?
Commands stop execution with
Cannot ask question
What did you expect to happen instead?
Ideally, there should be an option to ignore variables when a
command
is executed. For example. I use commands to seed some data in the database for which only db connection string vars are required. The rest I should not need.How can we reproduce the bug? (as minimally and precisely as possible)
My devspace.yaml:
Local Environment:
kubectl version
]Anything else we need to know?
/kind bug