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

Suppress the annoying "Move to /Applications?" prompt #544

Closed
wants to merge 1 commit into from
Closed

Suppress the annoying "Move to /Applications?" prompt #544

wants to merge 1 commit into from

Conversation

Crazor
Copy link
Contributor

@Crazor Crazor commented Jun 19, 2013

Just noticed that f.lux wants to move itself to /Applications if it is not there on launch. Figured out the default value that f.lux uses to remember the user doesn't want this behaviour and added it to the cask.

Usually, I wouldn't want any casks to touch my defaults, but in this case I think that it is in every cask user's interest to leave the app bundle where it is installed to by brew-cask and have it not moved anywhere else.

@vitorgalvao
Copy link
Member

We’ve been trying not to run commands from inside casks, but not wanting to show that warning is not an invalid concern. The amount of small use cases is starting to become significant, and each app seems to have its own little quirk. Thoughts/ideas, @phinze and @passcod?

@irrg
Copy link
Contributor

irrg commented Jun 25, 2013

Bartender and Alfred both also exhibit this behavior. Is there a third party library that they're maybe all leveraging that can be handled as such? It all looks very cookie-cutter.

@vitorgalvao
Copy link
Member

Yes, there is, and there’s actually a compelling argument for it (even if we could argue that this would not apply to homebrew-cask users).

Ultimately, since you can effectively dismiss that option on launch, I think maintaining casks “clean” would be preferable, unless we eventually come up with a better system to implement these one-off actions directly.

@phinze
Copy link
Contributor

phinze commented Jul 22, 2013

I like the idea of Casks capturing tweaks that a user might want to implement on install.

As it stands, this code executes at Class eval time (and so would write the default for every user who lists the cask).

This sort of makes me things of homebrew's options system. https://github.com/mxcl/homebrew/wiki/Formula-Cookbook#adding-optional-steps

I wonder if it makes sense for us to look into providing something like this?

I do see this as being in-line with my project goal of having Casks capture, document, and automate the complexity of mac software installation, so I think this path is worth exploring!

@vitorgalvao
Copy link
Member

I wonder if it makes sense for us to look into providing something like this?

I’m all for it.

I do see this as being in-line with my project goal of having Casks capture, document, and automate the complexity of mac software installation, so I think this path is worth exploring!

And so are you.

@Crazor
Copy link
Contributor Author

Crazor commented Jul 23, 2013

As it stands, this code executes at Class eval time (and so would write the default for every user who lists the cask).

Whoops! Should've better learned my Ruby ;)

This sort of makes me things of homebrew's options system. https://github.com/mxcl/homebrew/wiki/Formula-Cookbook#adding-optional-steps

I wonder if it makes sense for us to look into providing something like this?

Definitely! Since OS X has great tools for working with the defaults system, something like my naive call to system() (without the class eval problem of course ;) should suffice as a first implementation, e.g. let the cask author add any commands that will be run.

@Crazor
Copy link
Contributor Author

Crazor commented Aug 3, 2013

Just wanted to leave a note here that the GitHub program/cask could use this fix, too.

@Crazor
Copy link
Contributor Author

Crazor commented Aug 8, 2013

Same with f.lux

@Crazor
Copy link
Contributor Author

Crazor commented Aug 10, 2013

Same with Hands Off

@codykrieger
Copy link
Contributor

Things also presents this warning, FWIW.

@sheerun
Copy link
Contributor

sheerun commented Sep 22, 2013

If F.lux is symlinked in /Applications there is absolutely no notification. @phinze Couldn't cask use /Applications folder for installing apps? Installations are shared between users anyway.. The same with Homebrew, it doesn't leverage per-user binaries, just global ones. Moreover I like to put my /Applications folder to Dock, and now I must use smart folder or 2 folders. I really mean it, let's install to /Applications.

@phinze
Copy link
Contributor

phinze commented Sep 22, 2013

Couldn't cask use /Applications folder for installing apps?

@sheerun - see #30 for relevant historical discussion

Currently you can change the app symlink dir with an option.

If you're proposing to change the default target to /Applications (which is an idea I'm willing to at least talk about) I'd recommend opening a new issue to discuss. If the option works well enough for you, then enjoy! 😀

phinze added a commit that referenced this pull request Dec 6, 2013
this allows us to experiment with behavior that we may not want to
promote to an official feature just yet.

i'm thinking about stuff like #544, and other things i can't foresee

we'll have to be careful to not let this get out of hand, but i think
it could be helpful for cask authors to be able to try and problem solve
locally.
@phinze phinze closed this in fb19d4d Dec 6, 2013
@phinze
Copy link
Contributor

phinze commented Dec 6, 2013

Okay the latest release has a hook to support this, and I pulled in a modified version of the commit that uses it. It looks good from here - can folks test f-lux and submit more PRs for the other mentioned apps? 🍔

kevinSuttle pushed a commit to kevinSuttle/homebrew-cask that referenced this pull request Dec 8, 2013
this allows us to experiment with behavior that we may not want to
promote to an official feature just yet.

i'm thinking about stuff like Homebrew#544, and other things i can't foresee

we'll have to be careful to not let this get out of hand, but i think
it could be helpful for cask authors to be able to try and problem solve
locally.
kevinSuttle pushed a commit to kevinSuttle/homebrew-cask that referenced this pull request Dec 8, 2013
…rompt.

closes Homebrew#544

Signed-off-by: Paul Hinze <paul.t.hinze@gmail.com>
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 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

Successfully merging this pull request may close these issues.

None yet

7 participants