Files
nixpkgs/pkgs/by-name/rs/rstudio/r-location.patch
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

42 lines
1.6 KiB
Diff

diff --git a/src/cpp/core/r_util/REnvironmentPosix.cpp b/src/cpp/core/r_util/REnvironmentPosix.cpp
index a4e964d49d..512707801b 100644
--- a/src/cpp/core/r_util/REnvironmentPosix.cpp
+++ b/src/cpp/core/r_util/REnvironmentPosix.cpp
@@ -108,13 +108,7 @@ FilePath systemDefaultRScript(std::string* pErrMsg)
{
// check fallback paths
std::vector<std::string> rScriptPaths = {
- "/usr/bin/R",
- "/usr/local/bin/R",
- "/opt/local/bin/R",
- #ifdef __APPLE__
- "/opt/homebrew/bin/R",
- "/Library/Frameworks/R.framework/Resources/bin/R",
- #endif
+ "@R@/bin/R"
};
return scanForRScript(rScriptPaths, pErrMsg);
@@ -226,8 +220,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())
{
diff --git a/src/node/desktop/src/main/detect-r.ts b/src/node/desktop/src/main/detect-r.ts
index 5b768b7cbf..c0efeac0fe 100644
--- a/src/node/desktop/src/main/detect-r.ts
+++ b/src/node/desktop/src/main/detect-r.ts
@@ -305,6 +305,7 @@ writeLines(sep = "\x1F", c(
}
export function scanForR(): Expected<string> {
+ return ok('@R@/bin/R');
// if the RSTUDIO_WHICH_R environment variable is set, use that
// note that this does not pick up variables set in a user's bash profile, for example
const rstudioWhichR = getenv('RSTUDIO_WHICH_R');