taskman_dotnet/dotnet.inc.php

32 lines
553 B
PHP

<?php
namespace taskman;
task('dotnet_set_env', ['always' => true], function() {
dotnet_set_env();
});
task('dotnet_install', function() {
DotnetSupport::install();
});
function dotnet_shell($cmd)
{
shell('dotnet ' . $cmd);
}
function dotnet_shell_get($cmd)
{
return shell_get('dotnet ' . $cmd);
}
function dotnet_set_env()
{
putenv("DOTNET_CLI_TELEMETRY_OPTOUT=1");
$dotnet_path = DotnetSupport::getPath();
if(is_win())
putenv("PATH=$dotnet_path;".getenv('PATH'));
else
putenv("PATH=$dotnet_path:".getenv('PATH'));
}