updated support for passing public/private env
manual merge conflicts