diff options
author | RĂ©mi Lacroix <remi.lacroix@idris.fr> | 2024-04-29 23:47:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-29 14:47:37 -0700 |
commit | a3aa5b59cd04f296333228915199a881f4b077a8 (patch) | |
tree | 22b1ce6eee0ef42bcce7bf2a7dd885ce1a82cf89 /var | |
parent | f7dbb59d13a092eaf147225b83e1e88a7b3c2a28 (diff) | |
download | spack-a3aa5b59cd04f296333228915199a881f4b077a8.tar.gz spack-a3aa5b59cd04f296333228915199a881f4b077a8.tar.bz2 spack-a3aa5b59cd04f296333228915199a881f4b077a8.tar.xz spack-a3aa5b59cd04f296333228915199a881f4b077a8.zip |
dotnet-core-sdk: Fix environment setup (#43842)
The "DOTNET_CLI_TELEMETRY_OPTOUT" environment variable should be defined when using the product, not when installing it (the installation phase is just extract the files anyway).
Also use `~` instead of `-` to check for the variant and fix the second argument for `env.set` which should also be a string.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dotnet-core-sdk/package.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py b/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py index 723d502141..6f74fe3d5d 100644 --- a/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py +++ b/var/spack/repos/builtin/packages/dotnet-core-sdk/package.py @@ -86,9 +86,9 @@ class DotnetCoreSdk(Package): variant("telemetry", default=False, description="allow collection of telemetry data") - def setup_build_environment(self, env): - if "-telemetry" in self.spec: - env.set("DOTNET_CLI_TELEMETRY_OPTOUT", 1) + def setup_run_environment(self, env): + if "~telemetry" in self.spec: + env.set("DOTNET_CLI_TELEMETRY_OPTOUT", "1") def install(self, spec, prefix): mkdirp("bin") |