Skip to content

Commit

Permalink
Tweak to R exe path on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathon-love committed Feb 10, 2024
1 parent 1a9f741 commit e5c3cea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions compilerr.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,7 @@ const compile = function(srcDir, moduleDir, paths, packageInfo, log, options) {
log.debug('appended');

try {
if (process.platform === 'darwin')
cmd = util.format('"%s" "--library=%s" --no-help --no-demo --no-html --no-docs --no-multiarch "%s"', path.join(paths.rHome, 'bin', 'INSTALL'), buildDir, tempPath);
else if (paths.rHome)
if (paths.rHome)
cmd = util.format('"%s" CMD INSTALL "--library=%s" --no-help --no-demo --no-html --no-docs --no-multiarch "%s"', paths.rExe, buildDir, tempPath);
else
cmd = util.format('R CMD INSTALL "--library=%s" --no-help --no-demo --no-html --no-docs --no-multiarch "%s"', buildDir, tempPath);
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ try {
let bin = path.dirname(exe);
let home = path.dirname(bin);
let rHome = path.join(home, 'Frameworks', 'R.framework', 'Versions', 'Current', 'Resources');
let rExe = path.join(bin, 'R');
const rExe = path.join(rHome, 'bin', 'R');
let rLibs = `${ path.join(home, 'Resources', 'modules', 'base', 'R')}`;
paths = { home, rHome, rExe, rLibs };
platName = 'macos';
Expand Down

0 comments on commit e5c3cea

Please sign in to comment.