Skip to content

Commit

Permalink
Avoid r-project.org URLs
Browse files Browse the repository at this point in the history
Prefer rstudio.com or GH, to work around the DNS
issues.
  • Loading branch information
gaborcsardi committed Oct 27, 2023
1 parent 650a554 commit e40ad90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions setup-r/lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function acquireFortranMacOS(version) {
}
function acquireFortranMacOSNew() {
return __awaiter(this, void 0, void 0, function* () {
let downloadUrl = "https://mac.r-project.org/tools/gfortran-12.2-universal.pkg";
let downloadUrl = "https://github.com/r-hub/mac-tools/releases/download/tools/gfortran-12.2-universal.pkg";
let fileName = path.basename(downloadUrl);
let downloadPath = null;
try {
Expand Down Expand Up @@ -202,7 +202,7 @@ function acquireFortranMacOSOld() {
let gfortran = "gfortran-8.2-Mojave";
let mntPath = path.join("/Volumes", gfortran);
let fileName = `${gfortran}.dmg`;
let downloadUrl = `https://mac.r-project.org/tools/${fileName}`;
let downloadUrl = `https://github.com/r-hub/mac-tools/releases/download/tools/${fileName}`;
let downloadPath = null;
try {
downloadPath = yield tc.downloadTool(downloadUrl);
Expand Down Expand Up @@ -450,10 +450,10 @@ function getRtoolsUrl(version) {
return "https://github.com/r-hub/rtools42/releases/download/latest/rtools42.exe";
}
else if (version == "40") {
return "https://cran.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe";
return "https://cran.rstudio.com/bin/windows/Rtools/rtools40-x86_64.exe";
}
else {
return `https://cran.r-project.org/bin/windows/Rtools/Rtools${version}.exe`;
return `https://cran.rstudio.com/bin/windows/Rtools/Rtools${version}.exe`;
}
}
function acquireRtools(version) {
Expand Down Expand Up @@ -611,7 +611,7 @@ function setupRLibrary() {
}
let cran = `'${core.getInput("cran") ||
process.env["CRAN"] ||
"https://cloud.r-project.org"}'`;
"https://cran.rstudio.com"}'`;
let user_agent;
if (core.getInput("http-user-agent") === "release") {
let os = IS_WINDOWS ? "win" : IS_MAC ? "macos" : "tarball";
Expand Down
10 changes: 5 additions & 5 deletions setup-r/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async function acquireFortranMacOS(version: string): Promise<string> {
}

async function acquireFortranMacOSNew(): Promise<string> {
let downloadUrl = "https://mac.r-project.org/tools/gfortran-12.2-universal.pkg";
let downloadUrl = "https://github.com/r-hub/mac-tools/releases/download/tools/gfortran-12.2-universal.pkg";
let fileName = path.basename(downloadUrl);
let downloadPath: string | null = null;
try {
Expand Down Expand Up @@ -176,7 +176,7 @@ async function acquireFortranMacOSOld(): Promise<string> {
let gfortran: string = "gfortran-8.2-Mojave";
let mntPath: string = path.join("/Volumes", gfortran);
let fileName: string = `${gfortran}.dmg`;
let downloadUrl: string = `https://mac.r-project.org/tools/${fileName}`;
let downloadUrl: string = `https://github.com/r-hub/mac-tools/releases/download/tools/${fileName}`;
let downloadPath: string | null = null;

try {
Expand Down Expand Up @@ -432,9 +432,9 @@ function getRtoolsUrl(version: string): string {
} else if (version == "42") {
return "https://github.com/r-hub/rtools42/releases/download/latest/rtools42.exe";
} else if (version == "40") {
return "https://cran.r-project.org/bin/windows/Rtools/rtools40-x86_64.exe";
return "https://cran.rstudio.com/bin/windows/Rtools/rtools40-x86_64.exe";
} else {
return `https://cran.r-project.org/bin/windows/Rtools/Rtools${version}.exe`;
return `https://cran.rstudio.com/bin/windows/Rtools/Rtools${version}.exe`;
}
}

Expand Down Expand Up @@ -597,7 +597,7 @@ async function setupRLibrary() {

let cran = `'${core.getInput("cran") ||
process.env["CRAN"] ||
"https://cloud.r-project.org"}'`;
"https://cran.rstudio.com"}'`;

let user_agent;

Expand Down

2 comments on commit e40ad90

@aj-sykes92
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a (possibly) related issue with one of my workflows recently. Any chance you could elaborate on the context for this commit?

@gaborcsardi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DNS was not working for the r-project.org domain.

Please sign in to comment.