diff --git a/lib/main.js b/lib/main.js index 0907e11..3f2281d 100644 --- a/lib/main.js +++ b/lib/main.js @@ -45,22 +45,24 @@ function resolveGradleExecutable(baseDirectory) { return __awaiter(this, void 0, void 0, function* () { const gradleVersion = inputOrNull("gradle-version"); if (gradleVersion != null) { - return provision.gradleVersion(gradleVersion); + return path.resolve(yield provision.gradleVersion(gradleVersion)); } const gradleExecutable = inputOrNull("gradle-executable"); if (gradleExecutable != null) { - return path.join(baseDirectory, gradleExecutable); + return path.resolve(baseDirectory, gradleExecutable); } const wrapperDirectory = inputOrNull("wrapper-directory"); const executableDirectory = wrapperDirectory != null ? path.join(baseDirectory, wrapperDirectory) : baseDirectory; - return path.join(executableDirectory, gradlew.wrapperFilename()); + return path.resolve(executableDirectory, gradlew.wrapperFilename()); }); } function resolveBuildRootDirectory(baseDirectory) { let buildRootDirectory = inputOrNull("build-root-directory"); - return buildRootDirectory == null ? baseDirectory : path.join(baseDirectory, buildRootDirectory); + return buildRootDirectory == null + ? path.resolve(baseDirectory) + : path.resolve(baseDirectory, buildRootDirectory); } function parseCommandLineArguments() { const input = inputOrNull("arguments");