Tweaking env

This commit is contained in:
Pavel Shevaev 2024-09-23 19:02:14 +03:00
parent 868ea48c21
commit 85d6434afe
1 changed files with 5 additions and 3 deletions

View File

@ -9,8 +9,8 @@ class DotnetSupport
} }
} }
task('dotnet_set_env_path', ['always' => true], function() { task('dotnet_set_env', ['always' => true], function() {
dotnet_set_env_path(); dotnet_set_env();
}); });
task('dotnet_install', function() { task('dotnet_install', function() {
@ -47,8 +47,10 @@ function dotnet_install(string $version)
shell("\"$install_file_path\" --channel $channel"); shell("\"$install_file_path\" --channel $channel");
} }
function dotnet_set_env_path() function dotnet_set_env()
{ {
putenv("DOTNET_CLI_TELEMETRY_OPTOUT=1");
$dotnet_path = dotnet_get_path(); $dotnet_path = dotnet_get_path();
if(is_win()) if(is_win())
putenv("PATH=$dotnet_path;".getenv('PATH')); putenv("PATH=$dotnet_path;".getenv('PATH'));