Non-deterministic builds? Longstanding issue w/ env vars

I’m not an expert on how dotenv works - I think that’s what reads your env files, yes? I usually recommend people avoid it since it doesn’t “just work” perfectly for all cases at netlify (cf [Support Guide] Using environment variables on Netlify correctly)

I’d suggest instead using our deploy contexts to set things via netlify.toml - any chance that your workflow could be adapted to that?

If not, I’d suggest at a minimum to abort your build if it is set wrong - you could check before starting build, something like:

if [ "$SOME_ENV_VAR" == "localvalue"] ; then exit 1; fi && your-normal-build-command

Happy to take a bug report if you can find a reliable reproduction step too but this will maybe help you avoid the 20% bad builds with no major effort :slight_smile: