Skip to content
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

Bug: Exit with error, if the app is already there #23377

Closed
tsparber opened this issue Aug 2, 2016 · 4 comments
Closed

Bug: Exit with error, if the app is already there #23377

tsparber opened this issue Aug 2, 2016 · 4 comments

Comments

@tsparber
Copy link
Contributor

tsparber commented Aug 2, 2016

Description of enhancement

When installing an App that is already there, HBC should (in my opinion) exit with an error or warning.

Justification

The current behavior with the output message of "success" is misleading, as the app (probably a newer version) has not been successfully installed as it could not be moved.

Example use case

$ brew cask install firefox
==> Downloading https://ftp.mozilla.org/pub/firefox/releases/48.0/mac/en-US/Firefox%2048.0.dmg
Already downloaded: /Users/tommy/Library/Caches/Homebrew/firefox-48.0.dmg
==> Verifying checksum for Cask firefox
==> It seems there is already an App at '/Applications/Firefox.app'; not moving.
🍺  firefox was successfully installed!

(well, actually it was not)

@vitorgalvao
Copy link
Member

Agreed. So much so, I consider the current behaviour a bug.

@vitorgalvao vitorgalvao added bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. labels Aug 2, 2016
@tsparber tsparber changed the title Feature request: Exit with error, if the app is already there Bug: Exit with error, if the app is already there Aug 3, 2016
@frm
Copy link

frm commented Oct 3, 2016

I've been tackling this but I have one question regarding the intended behavior: what should happen if brew cask is invoked with multiple apps and one of them already exists?

Exiting with an error would not install the remaining apps.

@reitermarkus
Copy link
Member

reitermarkus commented Oct 3, 2016

Ideally it would loop through all of them, and if one of them fails it is rescued with an error message, but the loop continues. Of course, the exit code at the end should be non-zero in this case.

Well, this should basically be the behaviour for any sort of install failure, not just when an app already exists.

@vitorgalvao
Copy link
Member

Closing in favour of Homebrew/brew#1590.

@miccal miccal removed bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. ready to implement labels Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants