Empty env vars not being set in container jobs
Describe the bug When you set container env vars, if the env var is an empty string, the env var doesn't get set. This is incorrect as for some purposes there is a logical difference between an env var not being set and an env var being set to an empty string.
To Reproduce
jobs:
test_env_var_bug:
name: Test Empty Env Var Bug
runs-on: ubuntu-latest
container:
image: node:18
env:
FOO_ONE: ""
FOO_TWO: "I show up!"
steps:
- name: TEST
run: env | grep "FOO"
Console output:
Expected behavior
I'd expect that both env vars are set in the env and that when you run env you'd see something like this:=
Console output:
Run env | grep "FOO"
FOO_ONE=
FOO_TWO=I show up!
Runner Version and Platform
'2.311.0' ubuntu-latest
I got the same bug
besides, in the below case, var is ""
export var=""
echo $var
> ""
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.
Adding comment to remove stale tag.