internal/vcs: avoid using os.Environ in a test helper
As reported by GODEBUG=gocachehash=1, this caused every single env var
set in the current environment to be part of the test cache key:
$ grep testInput before | wc -l
284
$ grep testInput after | wc -l
39
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I9e8f87bbe60fda9b3d37817a4c24c8ace24a9018
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201442
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>