Skip to content

Commit

Permalink
[setup-r]: try to unlink brew R silently (#891)
Browse files Browse the repository at this point in the history
* [setup-r]: try to unlink brew R silently

To avoid #864.

* [setup-r]: run brew install silently

brew likes to warn about already installed packages
and env vars, but we don't care about these.

* NEWS for avoiding brew warnings
  • Loading branch information
gaborcsardi authored Aug 2, 2024
1 parent c899797 commit 732fb28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
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 avoids spurious warnings from Homebrew (#864).

* `[setup-r-dependencies]` now accepts `pak-version: none` to skip pak
installation. pak should be already installed on the system in this
case, otherwise the dependencies resolution and installation will fail.
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.

4 changes: 2 additions & 2 deletions setup-r/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function acquireUtilsMacOS() {
"pkgconfig",
"checkbashisms",
"ghostscript",
]);
], { silent: true });
} catch (error) {
core.debug(`${error}`);

Expand Down Expand Up @@ -398,7 +398,7 @@ async function acquireRMacOS(version: IRVersion): Promise<string> {

// Remove homebrew R from the PATH
try {
await exec.exec("brew", ["unlink", "r"]);
await exec.exec("brew", ["unlink", "r"] , { silent: true });
} catch (error) {
core.debug(`${error}`);
}
Expand Down

0 comments on commit 732fb28

Please sign in to comment.