8000 [setup-r]: resolve older R to x86_64 on macOS by gaborcsardi · Pull Request #893 · r-lib/actions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[setup-r]: resolve older R to x86_64 on macOS #893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
unchanged, on all R versions. To avoid using a P3M snapshot on R 3.6.x,
set the `RSPM_PIN_3_6` environment variable to `false`.

* `[setup-r]` now installs the x86_64 build of R on arm64 macOS, if there
is no arm64 build available for this R version (#883).

* Example blogdown, bookdown, document, pr-commands and render-markdown
workflows now correctly have write permission to repository contents
(#874, @remlapmot).
Expand Down
2 changes: 1 addition & 1 deletion setup-r/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup-r/dist/index.js.map

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion setup-r/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -756,9 +756,18 @@ export async function determineVersion(version: string): Promise<IRVersion> {
if (ARCH) {
url = url + "/" + ARCH;
}
let tags = (await rest.get<IRVersion>(url)).result;
var tags = (await rest.get<IRVersion>(url)).result;

if (!tags) {
// if arm mac, try intel as well
if (OS == "mac" && ARCH == "arm64") {
let url2: string =
"https://api.r-hub.io/rversions/resolve/" + version + "/" + OS;
tags = (await rest.get<IRVersion>(url2)).result;
if (!tags) {
throw new Error(`Failed to resolve R version ${version} at ${url} and ${url2}`);
}
}
throw new Error(`Failed to resolve R version ${version} at ${url}.`);
}

Expand Down
Loading
0