John "codefu" McDole dd7ad71bbb
[CP-Stable] Unset GIT_DIR and other variables before updating (#166772)
Cherry picks #165818

`update_engine_version.{ps1|sh}` needs to operate on a foreign repository.
When flutter is run in a git-hook, these environment variables will override our git calls location and corrupt the install.

Cherry pick notes: The files are diverging a bit; but the guts of the change were clean (ps1|sh) and the tests just needed some care.
2025-04-10 15:54:19 +00:00
..