homebrew-cask-upgrade icon indicating copy to clipboard operation
homebrew-cask-upgrade copied to clipboard

Respecting appdir

Open Saklad5 opened this issue 7 years ago • 9 comments

Looking over your code, you install all updated Casks to /Applications, even if they were installed using the --appdir=path parameter and resided somewhere else. Could you update the command to rectify this? If that isn’t possible for some reason, I’d settle for the ability to specify or exclude Casks with the command, perhaps via config file.

Saklad5 avatar Oct 26 '16 18:10 Saklad5

Failing that, could you add a “dry run” option that doesn’t do anything after checking each Cask for updates? That would let the user make sure that nothing will be messed up.

Saklad5 avatar Oct 30 '16 18:10 Saklad5

@Saklad5 Thanks for your suggestion. I'm gonna add the --dry-run option soon.

buo avatar Oct 30 '16 18:10 buo

I think dry-run should be the default behavior. Kicking off something that could take hours to complete is something that should be done carefully.

In addition, people might feel reluctant to interrupt the install as they don't want to leave the system in a weird state (whether that is possible or not)...

jcrben avatar Nov 07 '16 01:11 jcrben

I’ve recently “discovered” the brew bundle project, which introduces a unified record (a “Brewfile) of installation from Homebrew, Homebrew-Cask, and even the Mac App Store among other things. Most importantly, it uses easily parsable syntax and can store install arguments.

Would it be possible to, given a path to a Brewfile with the desired arguments added for each Cask, do what I’m asking for here? This seems like it should be quite simple to do, and I might even try my hand if I get the time.

Speaking of which, I appreciate that you are taking the time to consider these changes. So long as you respond to these comments in a timely fashion (within a month, really), I don’t care how long it ends up taking for you to implement these ideas. In the meantime, I can just run brew cu with my hand over Control-C to stop it if it tries to update anything outside of /Applications.

Saklad5 avatar Nov 26 '16 21:11 Saklad5

For your information, dry-run became the default behavior in #38.

buo avatar Mar 21 '17 05:03 buo

I noticed, thank you. I feel the command is much approved now that I don't have to rest my hands on Control-C.

By the way, have you noticed that brew cask outdated has been implemented?

Saklad5 avatar Mar 21 '17 16:03 Saklad5

@Saklad5 I have seen the updated code, but it doesn't affect this project so far.

buo avatar Mar 23 '17 08:03 buo

Is there a way to have updates use the same appdir used to install them? I am trying to use cask as a non-admin and when brew cu updates it trys to place it in /Application by default?

blacktop avatar May 28 '17 00:05 blacktop

@buo Let me just congratulate you and your team for this great app !

sebma avatar Apr 20 '18 17:04 sebma