Skip to content

Commit

Permalink
Add boolean option to control adding mingw to the PATH
Browse files Browse the repository at this point in the history
Fixes #228
  • Loading branch information
jimhester committed Jan 13, 2021
1 parent b53babd commit 1efbdeb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions setup-r/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ inputs:
default: 'default'
install-r:
default: true
windows-path-include-mingw:
description: 'If "true" put the 64 bit mingw directory from Rtools on the
PATH for Windows builds'
default: true
outputs:
installed-r-version:
description: 'The full R version installed'
Expand Down
8 changes: 6 additions & 2 deletions setup-r/lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,15 @@ function acquireRtools(version) {
}
if (rtools4) {
core.addPath(`C:\\rtools40\\usr\\bin`);
core.addPath(`C:\\rtools40\\mingw64\\bin`);
if (core.getInput("windows-path-include-mingw")) {
core.addPath(`C:\\rtools40\\mingw64\\bin`);
}
}
else {
core.addPath(`C:\\Rtools\\bin`);
core.addPath(`C:\\Rtools\\mingw_64\\bin`);
if (core.getInput("windows-path-include-mingw")) {
core.addPath(`C:\\Rtools\\mingw_64\\bin`);
}
}
});
}
Expand Down
8 changes: 6 additions & 2 deletions setup-r/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,14 @@ async function acquireRtools(version: string) {
}
if (rtools4) {
core.addPath(`C:\\rtools40\\usr\\bin`);
core.addPath(`C:\\rtools40\\mingw64\\bin`);
if (core.getInput("windows-path-include-mingw")) {
core.addPath(`C:\\rtools40\\mingw64\\bin`);
}
} else {
core.addPath(`C:\\Rtools\\bin`);
core.addPath(`C:\\Rtools\\mingw_64\\bin`);
if (core.getInput("windows-path-include-mingw")) {
core.addPath(`C:\\Rtools\\mingw_64\\bin`);
}
}
}

Expand Down

0 comments on commit 1efbdeb

Please sign in to comment.