mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-20 07:35:10 +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);
|
||||
}, 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();
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user