Commit Graph

19 Commits

Author SHA1 Message Date
Matt Wean 47383169de [WIP] Change artifact behavior to moving instead of symlinking (#13966)
* Change app artifact to move instead of link

First step towards change in installation behavior mentioned in [13201]

* Fix handling of binaries linked from inside of app bundles

Also adds `appdir` method for interpolation in stanzas

* Change appdir to root Applications directory

* Update 2-app tests

* Refactor: add options, ivars to `Installer`, `Download`

In preparation for upcoming changes, this commit cleans up some code. The commit includes:

- In order to reduce unnecessary object passing, make both the `force` and `skip_cask_deps` option into instance variables of the `Installer` class

- Introduce options hashes to initializers of both the `Installer` and `Download` class

- When the `install --force` command enters the fetch phase, make it explicit in the code that fetching is never enforced in that case.

- Update tests

* Force overwrite artifacts on `--force` reinstall

This commit changes the behavior of a `Moved` artifact such that if the target already exists, `brew cask install --force` will remove the existing target before moving the staged artifact.

In that case, the warning message will say *overwriting* instead of *not moving*.

The behavior of plain `brew cask install` remains unchanged; the same goes for the warning message for that case.

* Change remaining artifacts to move instead of symlink

* Update casks to use appdir in binary paths

* Forcibly overwrite artifacts, modifying flags and using `sudo` if needed

- This commit implements [the proposed behavior for `install --force`](https://github.com/caskroom/homebrew-cask/pull/13966#issuecomment-220830387) when a target already exists and has either permission problems or is not owned by the user.

- The changes apply only when the `force` option is given.

- Reused the existing safeguard from the `.pkg` artifact to prevent deleting important directories by bug or mistake

- The two existing blacklists `SYSTEM_DIRS` and `UNDELETABLE_DIRS` have been consolidated into the `Hbc::MacOS` module.

- `UNDELETABLE_DIRS` now also contains all the entries from `SYSTEM_DIRS` which was a to-do anyway.

- The two blacklists are now also frozen for good measure.

- The utility method `permissions_rmtree` was moved to `Hbc::Utils`.

- The `tried_permissions` part in `Utils` now falls back correctly when there are also ownership issues at the same time.

- Introduced a separate `current_user` method for mocking.

- Added an optional feature to `FakeSystemCommand` so it can now act as a proxy to `SystemCommand`.

- Added tests for various `permissions_rmtree` cases.
2016-05-31 15:23:21 -04:00
Victor Popkov dc4f25f655 mailmate.rb: fix vendor comment, update homepage to use SSL 2016-03-20 17:23:16 -04:00
Josh Hagins f7124183a5 Add fixes from rubocop-cask 0.2.2
See caskroom/rubocop-cask#10, caskroom/rubocop-cask#11
2016-01-04 04:06:21 -05:00
Josh Hagins feba4ec740 Remove DSL versions from all casks 2015-12-17 20:15:28 -05:00
Torsten Heinemann 74b2604190 Updated license field of mailmate .rb
Updated license from unknown to commercial
2015-04-14 21:14:06 -07:00
Victor Popkov 92da547508 mailmate.rb: add name 2015-04-12 20:07:16 +03:00
Vítor Galvão f35bf52dfa mailmate.rb: added vendor host comment 2015-01-18 01:04:30 +00:00
Vítor Galvão 27fb003006 mailmate.rb: change ':unknown' license comment 2014-12-20 13:46:37 +00:00
Roland Walker 3f6fc62620 license todo comment in mailmate 2014-12-10 08:50:02 -05:00
Roland Walker db1a07fb03 new-style header in mailmate 2014-11-13 12:36:09 -05:00
Roland Walker 2e6f085e92 add license stanza to mailmate 2014-10-01 11:43:20 -04:00
Roland Walker a3d29c33e8 :latest as symbol in mailmate 2014-09-17 07:42:52 -04:00
Roland Walker 46109ebc3b app stanza in mailmate.rb 2014-09-15 12:05:54 -04:00
ndr ea00c6cec0 Reformat mailmate.rb according to readability conventions 2014-06-27 02:01:26 +02:00
Roland Walker c8cd897435 mass convert Casks to sha256 :no_check 2014-05-08 08:51:31 -04:00
Roland Walker af577ebd15 add files_in_usr_local caveat to several Casks 2014-02-21 10:44:44 -05:00
Stratos Moros 13445bdfc1 update a few cask to use `binary` artifact
This is obviously not an exhaustive list. I have included it in
the branch to demonstrate the new feature.
2014-01-05 22:55:18 +02:00
Stratos Moros b10b20aa7f replace sha1 with no_checksum
realized that a checksum doesn't make any sense for a cask whose
version is "latest"
2013-12-17 15:47:06 +02:00
Stratos Moros 3372679f69 add mailmate 2013-12-17 14:09:59 +02:00