From ba5e53c61d7c39e7733cdefda3a45f96b5ec0db4 Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Wed, 24 Nov 2021 09:08:35 +0900 Subject: [PATCH] refactor: use core.getBooleanInput() --- dist/index.js | 3 +-- src/setup-dotnet.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1ef7203..d897c56 100644 --- a/dist/index.js +++ b/dist/index.js @@ -478,8 +478,7 @@ function run() { } } if (versions.length) { - const includePrerelease = (core.getInput('include-prerelease') || 'false').toLowerCase() === - 'true'; + const includePrerelease = core.getBooleanInput('include-prerelease'); let dotnetInstaller; for (const version of new Set(versions)) { dotnetInstaller = new installer.DotnetCoreInstaller(version, includePrerelease); diff --git a/src/setup-dotnet.ts b/src/setup-dotnet.ts index 64f3149..2ae0459 100644 --- a/src/setup-dotnet.ts +++ b/src/setup-dotnet.ts @@ -38,9 +38,9 @@ export async function run() { } if (versions.length) { - const includePrerelease: boolean = - (core.getInput('include-prerelease') || 'false').toLowerCase() === - 'true'; + const includePrerelease: boolean = core.getBooleanInput( + 'include-prerelease' + ); let dotnetInstaller!: installer.DotnetCoreInstaller; for (const version of new Set(versions)) { dotnetInstaller = new installer.DotnetCoreInstaller(