Clone the BUILD_ENV to avoid side effect in other scripts or from other scripts.