#env var reset.... bug or feature

1 messages · Page 1 of 1 (latest)

polar breach
#

here's where fixing this "bug" could break other workflows: dagger -c 'container | with-env-variable --name=GOGO --value=dancer | from golang | from alpine | with-exec -- sh -c "env | grep ^GO" | stdout'

✔ withEnvVariable GOGO=dancer 0.0s
○ .from(address: "golang"): Container! 0.1s
$ .from(address: "alpine"): Container! 0.1s CACHED
✔ withExec sh -c 'env | grep ^GO' 0.1s
✔ .stdout: String! 0.1s

GOTOOLCHAIN=local
GOPATH=/go
GOGO=dancer
GOLANG_VERSION=1.25.6
#

would a user expect the with-env-variable call to persist?

#

I would lean towards bug too, but it could definetly break some users' code

ember quiver
#

Yeah I mean given that chained froms are already in "very weird" territory, I'd not be super concerned about this. We can leave the current behavior for back-compat in case someone is relying on it

#

Unless of course maintaining back-compat becomes a burden, in which case we can make a breaking change

polar breach
drifting quail
#

I didn't know it was even possible to chain from