mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 14:13:35 +00:00
31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
diff --git a/src/cpp/core/r_util/REnvironmentPosix.cpp b/src/cpp/core/r_util/REnvironmentPosix.cpp
|
|
index dbc9a9a1..9a526a86 100644
|
|
--- a/src/cpp/core/r_util/REnvironmentPosix.cpp
|
|
+++ b/src/cpp/core/r_util/REnvironmentPosix.cpp
|
|
@@ -107,12 +107,9 @@ FilePath systemDefaultRScript(std::string* pErrMsg)
|
|
{
|
|
// check fallback paths
|
|
std::vector<std::string> rScriptPaths = {
|
|
- "/usr/bin/R",
|
|
- "/usr/local/bin/R",
|
|
- "/opt/local/bin/R",
|
|
+ "@R@/bin/R"
|
|
#ifdef __APPLE__
|
|
- "/opt/homebrew/bin/R",
|
|
- "/Library/Frameworks/R.framework/Resources/bin/R",
|
|
+ "@R@/bin/R",
|
|
#endif
|
|
};
|
|
|
|
@@ -225,8 +222,7 @@ FilePath systemDefaultRScript(std::string* pErrMsg)
|
|
// scan in standard locations as a fallback
|
|
std::string scanErrMsg;
|
|
std::vector<std::string> rScriptPaths;
|
|
- rScriptPaths.push_back("/usr/local/bin/R");
|
|
- rScriptPaths.push_back("/usr/bin/R");
|
|
+ rScriptPaths.push_back("@R@/bin/R");
|
|
FilePath scriptPath = scanForRScript(rScriptPaths, &scanErrMsg);
|
|
if (scriptPath.isEmpty())
|
|
{
|
|
|