Skip to content

Create a 'link --overwrite' equivalent for 'install' #1742

@HaraldNordgren

Description

@HaraldNordgren

Build sometimes fail on the link step, prompting me to link and overwrite. I would like to be able to do this straight away, as an option for the install command.

Example scenario:

==> Installing gcc 
==> Downloading https://homebrew.bintray.com/bottles/gcc-6.3.0.sierra.bottle.tar
==> Pouring gcc-6.3.0.sierra.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 include/c++
Target /usr/local/include/c++
already exists. You may want to remove it:
  rm '/usr/local/include/c++'

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions