Run prettier

This commit is contained in:
Kevin Gosse 2022-06-22 16:00:25 +02:00
parent 1a3761f9e7
commit 058ea86842
2 changed files with 13 additions and 5 deletions

View File

@ -86,7 +86,6 @@ describe('installer tests', () => {
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
}, 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 () => {
await getDotnet('3.1', 'x86');
var directory = fs
@ -105,7 +104,6 @@ describe('installer tests', () => {
expect(process.env.PATH?.startsWith(toolDir)).toBe(true);
}, 600000); //This needs some time to download on "slower" internet connections
it('Throws if no location contains correct dotnet version', async () => {
let thrown = false;
try {
@ -164,8 +162,14 @@ function normalizeFileContents(contents: string): string {
.replace(new RegExp('\r', 'g'), '\n');
}
async function getDotnet(version: string, architecture: string = ''): Promise<void> {
const dotnetInstaller = new installer.DotnetCoreInstaller(version, architecture);
async function getDotnet(
version: string,
architecture: string = ''
): Promise<void> {
const dotnetInstaller = new installer.DotnetCoreInstaller(
version,
architecture
);
await dotnetInstaller.installDotnet();
installer.DotnetCoreInstaller.addToPath();
}

View File

@ -79,7 +79,11 @@ export class DotNetVersionInfo {
}
export class DotnetCoreInstaller {
constructor(version: string, architecture:string = '', includePrerelease: boolean = false) {
constructor(
version: string,
architecture: string = '',
includePrerelease: boolean = false
) {
this.version = version;
this.architecture = architecture;
this.includePrerelease = includePrerelease;