Skip to content
Snippets Groups Projects
Unverified Commit 5eff5b8b authored by Sergio Zharinov's avatar Sergio Zharinov Committed by GitHub
Browse files

fix(gradle): Use gradle wrapper inside docker (#5598)

parent de2986fa
No related branches found
No related tags found
No related merge requests found
...@@ -508,7 +508,7 @@ Array [ ...@@ -508,7 +508,7 @@ Array [
exports[`manager/gradle extractPackageFile should use docker even if gradlew is available 1`] = ` exports[`manager/gradle extractPackageFile should use docker even if gradlew is available 1`] = `
Array [ Array [
Object { Object {
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"gradle --init-script renovate-plugin.gradle renovate\\"", "cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"./gradlew --init-script renovate-plugin.gradle renovate\\"",
"options": Object { "options": Object {
"cwd": "localDir", "cwd": "localDir",
"encoding": "utf-8", "encoding": "utf-8",
...@@ -536,7 +536,7 @@ Array [ ...@@ -536,7 +536,7 @@ Array [
}, },
}, },
Object { Object {
"cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"gradle --init-script renovate-plugin.gradle renovate\\"", "cmd": "docker run --rm -v \\"localDir\\":\\"localDir\\" -w \\"localDir\\" renovate/gradle bash -l -c \\"./gradlew --init-script renovate-plugin.gradle renovate\\"",
"options": Object { "options": Object {
"cwd": "localDir", "cwd": "localDir",
"encoding": "utf-8", "encoding": "utf-8",
......
...@@ -24,7 +24,6 @@ import { ...@@ -24,7 +24,6 @@ import {
import { platform } from '../../platform'; import { platform } from '../../platform';
import { LANGUAGE_JAVA } from '../../constants/languages'; import { LANGUAGE_JAVA } from '../../constants/languages';
import { DATASOURCE_MAVEN } from '../../constants/data-binary-source'; import { DATASOURCE_MAVEN } from '../../constants/data-binary-source';
import { BinarySource } from '../../util/exec/common';
import { DatasourceError } from '../../datasource'; import { DatasourceError } from '../../datasource';
export const GRADLE_DEPENDENCY_REPORT_OPTIONS = export const GRADLE_DEPENDENCY_REPORT_OPTIONS =
...@@ -46,8 +45,6 @@ async function getGradleCommandLine( ...@@ -46,8 +45,6 @@ async function getGradleCommandLine(
): Promise<string> { ): Promise<string> {
const args = GRADLE_DEPENDENCY_REPORT_OPTIONS; const args = GRADLE_DEPENDENCY_REPORT_OPTIONS;
if (config.binarySource === BinarySource.Docker) return `gradle ${args}`;
const gradlewPath = upath.join(cwd, 'gradlew'); const gradlewPath = upath.join(cwd, 'gradlew');
const gradlewExists = await exists(gradlewPath); const gradlewExists = await exists(gradlewPath);
const gradlewExecutable = gradlewExists && (await canExecute(gradlewPath)); const gradlewExecutable = gradlewExists && (await canExecute(gradlewPath));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment