From 721e26d4b0c4ca4ec1306307bcde907ed9e02f3e Mon Sep 17 00:00:00 2001 From: Dan Carley Date: Wed, 16 Oct 2024 11:51:37 -0600 Subject: [PATCH] go: Set GOENV to environment cache Copied from our `--auto-setup` for Go projects. I haven't copied `go get .` because: 1. There may not be a `go.mod` yet. 2. It's surplus when subsequent `go` commands will run it. 3. We're planning to remove it from the setup hook. ` --- go/.flox/env/manifest.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go/.flox/env/manifest.toml b/go/.flox/env/manifest.toml index b5b46d6..58dc3a1 100644 --- a/go/.flox/env/manifest.toml +++ b/go/.flox/env/manifest.toml @@ -14,5 +14,11 @@ gore.pkg-path = "gore" gotests.pkg-path = "gotests" gotools.pkg-path = "gotools" +[hook] +on-activate = ''' + # Point GOENV to Flox environment cache + export GOENV="$FLOX_ENV_CACHE/goenv" +''' + [options] systems = ["aarch64-darwin", "aarch64-linux", "x86_64-darwin", "x86_64-linux"]