mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 15:40:20 +00:00
Run prettier
This commit is contained in:
parent
1a3761f9e7
commit
058ea86842
@ -86,7 +86,6 @@ describe('installer tests', () => {
|
|||||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
||||||
}, 600000); //This needs some time to download on "slower" internet connections
|
}, 600000); //This needs some time to download on "slower" internet connections
|
||||||
|
|
||||||
|
|
||||||
it('Acquires architecture-specific version of dotnet if no matching version is installed', async () => {
|
it('Acquires architecture-specific version of dotnet if no matching version is installed', async () => {
|
||||||
await getDotnet('3.1', 'x86');
|
await getDotnet('3.1', 'x86');
|
||||||
var directory = fs
|
var directory = fs
|
||||||
@ -105,7 +104,6 @@ describe('installer tests', () => {
|
|||||||
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
|
||||||
}, 600000); //This needs some time to download on "slower" internet connections
|
}, 600000); //This needs some time to download on "slower" internet connections
|
||||||
|
|
||||||
|
|
||||||
it('Throws if no location contains correct dotnet version', async () => {
|
it('Throws if no location contains correct dotnet version', async () => {
|
||||||
let thrown = false;
|
let thrown = false;
|
||||||
try {
|
try {
|
||||||
@ -164,8 +162,14 @@ function normalizeFileContents(contents: string): string {
|
|||||||
.replace(new RegExp('\r', 'g'), '\n');
|
.replace(new RegExp('\r', 'g'), '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getDotnet(version: string, architecture: string = ''): Promise<void> {
|
async function getDotnet(
|
||||||
const dotnetInstaller = new installer.DotnetCoreInstaller(version, architecture);
|
version: string,
|
||||||
|
architecture: string = ''
|
||||||
|
): Promise<void> {
|
||||||
|
const dotnetInstaller = new installer.DotnetCoreInstaller(
|
||||||
|
version,
|
||||||
|
architecture
|
||||||
|
);
|
||||||
await dotnetInstaller.installDotnet();
|
await dotnetInstaller.installDotnet();
|
||||||
installer.DotnetCoreInstaller.addToPath();
|
installer.DotnetCoreInstaller.addToPath();
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,11 @@ export class DotNetVersionInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class DotnetCoreInstaller {
|
export class DotnetCoreInstaller {
|
||||||
constructor(version: string, architecture:string = '', includePrerelease: boolean = false) {
|
constructor(
|
||||||
|
version: string,
|
||||||
|
architecture: string = '',
|
||||||
|
includePrerelease: boolean = false
|
||||||
|
) {
|
||||||
this.version = version;
|
this.version = version;
|
||||||
this.architecture = architecture;
|
this.architecture = architecture;
|
||||||
this.includePrerelease = includePrerelease;
|
this.includePrerelease = includePrerelease;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user