taskman_dotnet/dotnet.inc.php

30 lines
467 B
PHP
Raw Normal View History

2024-09-23 18:27:20 +03:00
<?php
namespace taskman;
2024-09-23 19:36:59 +03:00
use Exception;
2024-09-23 18:27:20 +03:00
2024-09-23 19:02:14 +03:00
task('dotnet_set_env', ['always' => true], function() {
dotnet_set_env();
2024-09-23 18:27:20 +03:00
});
task('dotnet_install', function() {
DotnetSupport::install();
});
function dotnet_shell($cmd)
{
shell('dotnet ' . $cmd);
}
function dotnet_shell_get($cmd)
{
return shell_get('dotnet ' . $cmd);
}
2024-09-23 19:02:14 +03:00
function dotnet_set_env()
2024-09-23 18:27:20 +03:00
{
//TODO: do we need this one?
2024-09-23 19:02:14 +03:00
putenv("DOTNET_CLI_TELEMETRY_OPTOUT=1");
DotnetSupport::addEnvPath();
2024-09-23 18:27:20 +03:00
}