blob: 44e54b36e0c45939b925697e519c3080b98d117c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
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())
{
|