env variables in exec commands are not properly exported #4232
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/High
Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
/kind bug
What versions of software are you using?
Operating System:
Output of
odo version
:How did you run odo exactly?
I have a devfile that defines a command spawning new shell, for example like this:
Actual behavior
Expected behavior
notice the last line, it should print the correct value of $foo value
more info
When command defines the env variable than odo executes it as
<env.name>=<env.value> && <commandLine>
.But the correct behavior should be
export <env.name>=<env.value> && <commandLine>
. Export is important as it will make sure that the variable is available in all subshells not just in the current shell.This is not just for
build
command, but forrun
and any other commands that have this behavior./priority high
/kind bug
The text was updated successfully, but these errors were encountered: