Skip to content

Commit

Permalink
Merge pull request #5 from chali/FixPathGeneration
Browse files Browse the repository at this point in the history
Default content of PATH was overriden disallowing access to tool like git during yarn install
  • Loading branch information
chali authored Jan 23, 2020
2 parents 41789b7 + 6189fe6 commit 9602fa7
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/main/groovy/com/moowork/gradle/node/yarn/YarnExecRunner.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@ class YarnExecRunner
@Override
protected ExecResult doExecute()
{
if ( this.ext.download )
{
def yarnBinDir = this.variant.yarnBinDir.getAbsolutePath();

def npmBinDir = this.variant.npmBinDir.getAbsolutePath();

def nodeBinDir = this.variant.nodeBinDir.getAbsolutePath();

def path = yarnBinDir + File.pathSeparator + npmBinDir + File.pathSeparator + nodeBinDir;

// Take care of Windows environments that may contain "Path" OR "PATH" - both existing
// possibly (but not in parallel as of now)
if ( this.environment['Path'] != null )
{
this.environment['Path'] = path + File.pathSeparator + this.environment['Path']
}
else
{
this.environment['PATH'] = path + File.pathSeparator + this.environment['PATH']
}
}

return run( this.variant.yarnExec, this.arguments )
}

Expand Down

0 comments on commit 9602fa7

Please sign in to comment.