mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 11:31:07 +07:00
Call addToPath method on DotnetInstallDir directly
This commit is contained in:
parent
defac2491f
commit
89b480a0df
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -463,7 +463,6 @@ class DotnetCoreInstaller {
|
||||
}
|
||||
}
|
||||
exports.DotnetCoreInstaller = DotnetCoreInstaller;
|
||||
DotnetCoreInstaller.addToPath = DotnetInstallDir.addToPath;
|
||||
(() => {
|
||||
DotnetInstallDir.setEnvironmentVariable();
|
||||
})();
|
||||
@ -571,7 +570,7 @@ function run() {
|
||||
const installedVersion = yield dotnetInstaller.installDotnet();
|
||||
installedDotnetVersions.push(installedVersion);
|
||||
}
|
||||
installer_1.DotnetCoreInstaller.addToPath();
|
||||
installer_1.DotnetInstallDir.addToPath();
|
||||
}
|
||||
const sourceUrl = core.getInput('source-url');
|
||||
const configFile = core.getInput('config-file');
|
||||
|
@ -246,8 +246,6 @@ export abstract class DotnetInstallDir {
|
||||
}
|
||||
|
||||
export class DotnetCoreInstaller {
|
||||
static addToPath = DotnetInstallDir.addToPath;
|
||||
|
||||
static {
|
||||
DotnetInstallDir.setEnvironmentVariable();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as core from '@actions/core';
|
||||
import {DotnetCoreInstaller} from './installer';
|
||||
import {DotnetCoreInstaller, DotnetInstallDir} from './installer';
|
||||
import * as fs from 'fs';
|
||||
import path from 'path';
|
||||
import semver from 'semver';
|
||||
@ -69,7 +69,7 @@ export async function run() {
|
||||
const installedVersion = await dotnetInstaller.installDotnet();
|
||||
installedDotnetVersions.push(installedVersion);
|
||||
}
|
||||
DotnetCoreInstaller.addToPath();
|
||||
DotnetInstallDir.addToPath();
|
||||
}
|
||||
|
||||
const sourceUrl: string = core.getInput('source-url');
|
||||
|
Loading…
Reference in New Issue
Block a user