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
@ -86,9 +86,9 @@ class DotnetCoreSdk(Package):
|
|||||||
|
|
||||||
variant("telemetry", default=False, description="allow collection of telemetry data")
|
variant("telemetry", default=False, description="allow collection of telemetry data")
|
||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_run_environment(self, env):
|
||||||
if "-telemetry" in self.spec:
|
if "~telemetry" in self.spec:
|
||||||
env.set("DOTNET_CLI_TELEMETRY_OPTOUT", 1)
|
env.set("DOTNET_CLI_TELEMETRY_OPTOUT", "1")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp("bin")
|
mkdirp("bin")
|
||||||
|
Loading…
Reference in New Issue
Block a user