fixed bug: env was cropped when setting git_env