Skip to content

Conflicts with r-lib/actions/setup-r on macOS #375

@khaeru

Description

@khaeru

Describe the bug

In this workflow, we use both r-lib/actions/setup-r and setup-graphviz.

Recently the workflow began to error on macOS only; the key lines are:

==> Upgrading 1 dependent of upgraded formulae:
Disable this behaviour by setting HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
r 4.2.1_3 -> 4.2.1_4
==> Downloading https://ghcr.io/v2/homebrew/core/r/manifests/4.2.1_4
==> Downloading https://ghcr.io/v2/homebrew/core/r/blobs/sha256:a5d64662b14c9669f3a58f1c6ad30982db60d681e299a5163780af6c313c3835
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:a5d64662b14c9669f3a58f1c6ad30982db60d681e299a5163780af6c313c3835?se=2022-09-22T20%3A35%3A00Z&sig=zrLxcUkU1ehB8yeQmwlfdbuQC3MZZNZILZVDE%2B4IpJs%3D&sp=r&spr=https&sr=b&sv=2019-12-12
==> Upgrading r
  4.2.1_3 -> 4.2.1_4 

==> Pouring r--4.2.1_4.big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/R
Target /usr/local/bin/R
already exists. You may want to remove it:
  rm '/usr/local/bin/R'

To force the link and overwrite all conflicting files:
  brew link --overwrite r

To list all files that would be deleted:
  brew link --overwrite --dry-run r

Possible conflicting files are:
/usr/local/bin/R -> /Library/Frameworks/R.framework/Resources/bin/R
/usr/local/bin/Rscript -> /Library/Frameworks/R.framework/Resources/bin/Rscript

To Reproduce

Steps to reproduce the behavior:

# In an action

jobs:
  job-name:
    steps:
    - uses: r-lib/actions/setup-r@v2
    - uses: ts-graphviz/setup-graphviz@v1.1

Expected behavior

Both are installed and usable on the job runner.

I was able to work around the error by reversing the order: setup-graphviz before setup-r. Usability would be better if the actions were not sensitive to order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions