Share code for sanitizing ENV between both build environments