mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 23:50:19 +00:00
Enable console color output
This commit is contained in:
parent
c0d4ad69d8
commit
5cc153219b
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -339,6 +339,10 @@ class DotnetCoreInstaller {
|
||||
}
|
||||
console.log(process.env['PATH']);
|
||||
}
|
||||
static enableConsoleColorOutput() {
|
||||
core.exportVariable('DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION', 'true');
|
||||
core.exportVariable('TERM', 'xterm');
|
||||
}
|
||||
// versionInfo - versionInfo of the SDK/Runtime
|
||||
resolveVersion(versionInfo) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
@ -486,6 +490,7 @@ function run() {
|
||||
yield dotnetInstaller.installDotnet();
|
||||
}
|
||||
installer.DotnetCoreInstaller.addToPath();
|
||||
installer.DotnetCoreInstaller.enableConsoleColorOutput();
|
||||
}
|
||||
const sourceUrl = core.getInput('source-url');
|
||||
const configFile = core.getInput('config-file');
|
||||
|
@ -197,6 +197,11 @@ export class DotnetCoreInstaller {
|
||||
console.log(process.env['PATH']);
|
||||
}
|
||||
|
||||
static enableConsoleColorOutput() {
|
||||
core.exportVariable('DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION', 'true');
|
||||
core.exportVariable('TERM', 'xterm');
|
||||
}
|
||||
|
||||
// versionInfo - versionInfo of the SDK/Runtime
|
||||
async resolveVersion(versionInfo: DotNetVersionInfo): Promise<string> {
|
||||
if (versionInfo.isExactVersion()) {
|
||||
|
@ -50,6 +50,7 @@ export async function run() {
|
||||
await dotnetInstaller.installDotnet();
|
||||
}
|
||||
installer.DotnetCoreInstaller.addToPath();
|
||||
installer.DotnetCoreInstaller.enableConsoleColorOutput();
|
||||
}
|
||||
|
||||
const sourceUrl: string = core.getInput('source-url');
|
||||
|
Loading…
x
Reference in New Issue
Block a user