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.
This commit is contained in:
parent
f7dbb59d13
commit
a3aa5b59cd
1 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue