Skip to content

Commit

Permalink
Set working directory before fetching for gradle wrapper script
Browse files Browse the repository at this point in the history
  • Loading branch information
Nabil Benabbou committed Jun 16, 2017
1 parent 02c2265 commit 5cb4e73
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Tasks/Gradle/gradletask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,20 @@ async function run() {
try {
tl.setResourcePath(path.join(__dirname, 'task.json'));

// Set working directory
let workingDirectory: string = tl.getPathInput('cwd', false, true);
if (workingDirectory) {
tl.cd(workingDirectory);
}

// Configure wrapperScript
let wrapperScript: string = tl.getPathInput('wrapperScript', true, true);
wrapperScript = configureWrapperScript(wrapperScript);

// Set working directory
let workingDirectory: string = tl.getPathInput('cwd', false, true);
if (!workingDirectory) {
workingDirectory = path.dirname(wrapperScript);
tl.cd(workingDirectory);
}
tl.cd(workingDirectory);

let javaHomeSelection: string = tl.getInput('javaHomeSelection', true);
let codeCoverageTool: string = tl.getInput('codeCoverageTool');
Expand Down

0 comments on commit 5cb4e73

Please sign in to comment.