Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cue: stop trying to set $HOME in script_test.go
We used to have to try pretty hard to set up the OS-dependent versions of $HOME and $XDG_CONFIG_HOME in our testscripts, since we used to rely directly on APIs like os.UserConfigDir, which error if they can't make use of those environment variables. Since then, we have switched to $CUE_CONFIG_DIR and $CUE_CACHE_DIR, so we only need to make sure that they are set so that our code doesn't fall back to os.UserConfigDir and os.UserCacheDir. In particular, only $CUE_CACHE_DIR actually needs to be set for now, as our testscripts only write cache files, but no config files yet. While here, put the cache directory under $WORK/.tmp to mimic the rest of our directories, so it does not match `./...` patterns. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I2e1e0271f2e9d191d17f9ae3710763c2c9ea9381 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1177302 Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> TryBot-Result: CUEcueckoo <cueckoo@gmail.com> Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
- Loading branch information