From 70af846d7201b196cf86190463bd1e7fd946dca8 Mon Sep 17 00:00:00 2001 From: daz Date: Thu, 4 Jan 2024 13:21:21 -0700 Subject: [PATCH] Avoid unnecessary resolve of installed Gradle --- src/provision.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/provision.ts b/src/provision.ts index d8f57f8..9ff1b16 100644 --- a/src/provision.ts +++ b/src/provision.ts @@ -8,7 +8,6 @@ import * as toolCache from '@actions/tool-cache' import * as gradlew from './gradlew' import * as params from './input-params' -import * as layout from './repository-layout' import {handleCacheFailure, isCacheDisabled, isCacheReadOnly} from './cache-utils' const gradleVersionsBaseUrl = 'https://services.gradle.org/versions' @@ -20,13 +19,12 @@ const gradleVersionsBaseUrl = 'https://services.gradle.org/versions' export async function provisionGradle(): Promise { const gradleVersion = params.getGradleVersion() if (gradleVersion !== '' && gradleVersion !== 'wrapper') { - return addToPath(path.resolve(await installGradle(gradleVersion))) + return addToPath(await installGradle(gradleVersion)) } const gradleExecutable = params.getGradleExecutable() if (gradleExecutable !== '') { - const workspaceDirectory = layout.workspaceDirectory() - return addToPath(path.resolve(workspaceDirectory, gradleExecutable)) + return addToPath(gradleExecutable) } return undefined