Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

Error using --force to install/update some already installed casks #88401

Closed tiiiecherle closed 4 years ago

tiiiecherle commented 4 years ago

General troubleshooting steps

Description of issue

Some casks do not get installed correctly when using --force if app is already installed, e.g. nextcloud, github...

Command that failed

nextcloud is just an example, fails on multiple casks if cask is already installed.

brew cask install --force nextcloud && brew cask install --force nextcloud

Output of command with --force --verbose --debug

brew cask install --force nextcloud --verbose --debug
==> Cask::Installer#install
==> Printing caveats
==> Cask::Installer#fetch
==> Downloading
==> Downloading https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-3.0.1.pkg
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.4.14-27-ga39aae8\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.6\)\ curl/7.64.1 --retry 3 --location --silent --head --request GET https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-3.0.1.pkg
Already downloaded: /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
/usr/bin/xattr -p com.apple.quarantine /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
==> /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg is quarantined
==> Downloaded to -> /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
==> Verifying SHA-256 checksum for Cask 'nextcloud'.
==> Installing Cask nextcloud
==> Cask::Installer#stage
==> Extracting primary container
==> Using container class UnpackStrategy::Pkg for /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
cp -p /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg /usr/local/Caskroom/nextcloud/3.0.1/Nextcloud-3.0.1.pkg
==> Verifying Gatekeeper status of /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
/usr/bin/xattr -p com.apple.quarantine /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
==> /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg is quarantined
==> Propagating quarantine from /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg to /usr/local/Caskroom/nextcloud/3.0.1
/usr/bin/xattr -p com.apple.quarantine /Users/tom/Library/Caches/Homebrew/downloads/d5ec41b33f3d569bfdba5da811cafddfdd6286cddde5f209848e7c2cd50aaea3--Nextcloud-3.0.1.pkg
/usr/bin/xargs -0 -- /bin/chmod -h u\+w
/usr/bin/xargs -0 -- /usr/bin/xattr -w com.apple.quarantine 0181\;5f4abfa7\;Homebrew\\x20Cask\;7D556E3E-732F-42A0-9226-7C600A6A1D18
==> Creating metadata directory /usr/local/Caskroom/nextcloud/.metadata/3.0.1/20200829205456.344.
==> Creating metadata subdirectory /usr/local/Caskroom/nextcloud/.metadata/3.0.1/20200829205456.344/Casks.
==> Installing artifacts
==> 3 artifact/s defined
#<SortedSet: {#<Cask::Artifact::Uninstall:0x00007f90c02248b0 @cask=#<Cask::Cask:0x00007f90681a4aa0 @token="nextcloud", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb>, @tap=#<Tap:0x00007f90c01cea50 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007f90681a4a00@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/nextcloud>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/nextcloud/.metadata>, @config=#<Cask::Config:0x00007f90c0206ab8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>, @default={:languages=>["de-DE"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/tom/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/tom/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/tom/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/tom/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/tom/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/tom/Library/Fonts>, :servicedir=>#<Pathname:/Users/tom/Library/Services>, :input_methoddir=>#<Pathname:/Users/tom/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/tom/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/tom/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f90c0205e60 @cask=#<Cask::Cask:0x00007f90681a4aa0 ...>, @token="nextcloud", @version="3.0.1", @sha256="aea710cf0fae1f42fdffe6ca94b46929ef4a288ac51809de513a04a6f2a074b4", @url=#<URL:0x00007f90c0204d80 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-3.0.1.pkg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f90c020e9c0 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/>, @parameters={}>, @name=["Nextcloud"], @homepage="https://nextcloud.com/", @depends_on={:macos=>#<MacOSRequirement: [] version>=10.10>}, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/nextcloud/3.0.1>, @language=nil>>, @directives={:pkgutil=>"com.nextcloud.desktopclient", :signal=>[]}>, #<Cask::Artifact::Pkg:0x00007f90c0214de8 @cask=#<Cask::Cask:0x00007f90681a4aa0 @token="nextcloud", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb>, @tap=#<Tap:0x00007f90c01cea50 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007f90681a4a00@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/nextcloud>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/nextcloud/.metadata>, @config=#<Cask::Config:0x00007f90c0206ab8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>, @default={:languages=>["de-DE"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/tom/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/tom/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/tom/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/tom/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/tom/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/tom/Library/Fonts>, :servicedir=>#<Pathname:/Users/tom/Library/Services>, :input_methoddir=>#<Pathname:/Users/tom/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/tom/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/tom/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f90c0205e60 @cask=#<Cask::Cask:0x00007f90681a4aa0 ...>, @token="nextcloud", @version="3.0.1", @sha256="aea710cf0fae1f42fdffe6ca94b46929ef4a288ac51809de513a04a6f2a074b4", @url=#<URL:0x00007f90c0204d80 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-3.0.1.pkg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f90c020e9c0 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/>, @parameters={}>, @name=["Nextcloud"], @homepage="https://nextcloud.com/", @depends_on={:macos=>#<MacOSRequirement: [] version>=10.10>}, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/nextcloud/3.0.1>, @language=nil>>, @path=#<Pathname:/usr/local/Caskroom/nextcloud/3.0.1/Nextcloud-3.0.1.pkg>, @stanza_options={}>, #<Cask::Artifact::Binary:0x00007f90c021d448 @cask=#<Cask::Cask:0x00007f90681a4aa0 @token="nextcloud", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb>, @tap=#<Tap:0x00007f90c01cea50 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007f90681a4a00@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/nextcloud.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/nextcloud>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/nextcloud/.metadata>, @config=#<Cask::Config:0x00007f90c0206ab8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>, @default={:languages=>["de-DE"], :appdir=>#<Pathname:/Applications>, :colorpickerdir=>#<Pathname:/Users/tom/Library/ColorPickers>, :prefpanedir=>#<Pathname:/Users/tom/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/tom/Library/QuickLook>, :mdimporterdir=>#<Pathname:/Users/tom/Library/Spotlight>, :dictionarydir=>#<Pathname:/Users/tom/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/tom/Library/Fonts>, :servicedir=>#<Pathname:/Users/tom/Library/Services>, :input_methoddir=>#<Pathname:/Users/tom/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/tom/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/tom/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/tom/Library/Screen Savers>}, @env={}>, @dsl=#<Cask::DSL:0x00007f90c0205e60 @cask=#<Cask::Cask:0x00007f90681a4aa0 ...>, @token="nextcloud", @version="3.0.1", @sha256="aea710cf0fae1f42fdffe6ca94b46929ef4a288ac51809de513a04a6f2a074b4", @url=#<URL:0x00007f90c0204d80 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/Nextcloud-3.0.1.pkg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f90c020e9c0 @uri=#<URI::HTTPS https://download.nextcloud.com/desktop/releases/Mac/Installer/>, @parameters={}>, @name=["Nextcloud"], @homepage="https://nextcloud.com/", @depends_on={:macos=>#<MacOSRequirement: [] version>=10.10>}, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/nextcloud/3.0.1>, @language=nil>>, @source_string="/Applications/nextcloud.app/Contents/MacOS/nextcloudcmd", @target_string="", @source=#<Pathname:/Applications/nextcloud.app/Contents/MacOS/nextcloudcmd>, @target=#<Pathname:/usr/local/bin/nextcloudcmd>>}>
==> Installing artifact of class Cask::Artifact::Pkg
==> Running installer for nextcloud; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
/usr/bin/sudo -E -- /usr/bin/env LOGNAME=tom USER=tom USERNAME=tom /usr/sbin/installer -pkg /usr/local/Caskroom/nextcloud/3.0.1/Nextcloud-3.0.1.pkg -target / -verboseR
Password:
installer: Package name is Nextcloud Client
installer: Upgrading at base path /
installer:PHASE:Installation vorbereiten …
installer:PHASE:Volume vorbereiten …
installer:PHASE:„Nextcloud Client“ vorbereiten …
installer:PHASE:Warten, bis andere Installationen abgeschlossen werden …
installer:PHASE:Installation konfigurieren …
installer:STATUS:
installer:%17.584231
installer:PHASE:Dateien schreiben …
installer:%43.442713
installer:PHASE:Dateien schreiben …
installer:%69.648134
installer:PHASE:Objekte an Zielort bewegen …
installer:%89.891156
installer:PHASE:Paketskripte ausführen …
installer:%90.887821
installer:PHASE:Paketskripte ausführen …
installer:%91.181448
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Paketskripte ausführen …
installer:PHASE:Pakete überprüfen …
installer:%97.750000
installer:STATUS:Installationsaktionen ausführen …
installer:STATUS:
installer:PHASE:Installation abschließen …
installer:STATUS:
installer:%100.000000
installer:PHASE:Die Software wurde erfolgreich installiert.
installer: The upgrade was successful.
==> Installing artifact of class Cask::Artifact::Binary
==> Purging files for version 3.0.1 of Cask nextcloud
Error: It seems there already exists a Binary at '/usr/local/bin/nextcloudcmd'; not overwriting.
/usr/local/Homebrew/Library/Homebrew/cask/artifact/symlinked.rb:51:in `link'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/binary.rb:12:in `link'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/symlinked.rb:20:in `install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:221:in `block in install_artifacts'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:212:in `install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:104:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:44:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:43:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:43:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:89:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:238:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:165:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:113:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:243:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:243:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:213:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:165:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:113:in `<main>'

Output of brew cask doctor

 brew cask doctor
==> Homebrew Version
2.4.14-27-ga39aae8
==> macOS
10.15.6
==> SIP
Unknown (custom configuration)

configuration:
apple internal: disabled
kext signing: enabled
filesystem protections: disabled
debugging restrictions: disabled
dtrace restrictions: enabled
nvram protections: enabled
basesystem verification: enabled
==> Java
14.0.1
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3642 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (160 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (1558 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (157 casks)
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thor-1.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.43.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.7.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-0.89.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unicode-display_width-1.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-ast-0.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-wait-0.0.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-retry-0.6.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-its-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-3.9.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-mocks-3.9.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-expectations-3.9.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-core-3.9.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-support-3.9.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ronn-0.7.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/regexp_parser-1.7.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rdiscount-2.2.0.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/rdiscount-2.2.0.2
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/pry-0.13.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parlour-4.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rainbow-3.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parser-2.7.1.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel_tests-3.1.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel-1.19.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mustache-1.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/method_source-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/webrobots-0.1.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ntlm-http-0.1.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/nokogiri-1.10.10/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/nokogiri-1.10.10
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mini_portile2-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-persistent-4.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/net-http-digest_auth-1.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-3.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mime-types-data-3.2020.0512/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/http-cookie-1.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/hpricot-0.8.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/hpricot-0.8.6
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/domain_name-0.5.20190701/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf-0.1.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unf_ext-0.0.7.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/diff-lcs-1.4.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/connection_pool-2.2.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/commander-4.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/highline-2.0.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/coderay-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/codecov-0.2.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-0.19.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-html-0.12.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/docile-1.3.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/json-2.3.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/json-2.3.1
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/byebug-11.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/byebug-11.1.3
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ast-2.4.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/minitest-5.14.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL

Output of brew tap

homebrew/cask
homebrew/cask-drivers
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
vitorgalvao/tiny-scripts
vitorgalvao commented 4 years ago

Error: It seems there already exists a Binary at '/usr/local/bin/nextcloudcmd'; not overwriting.

@reitermarkus What do you think? Should --force override this?

miccal commented 4 years ago

Error: It seems there already exists a Binary at '/usr/local/bin/nextcloudcmd'; not overwriting.

@reitermarkus What do you think? Should --force override this?

I have made it so --force overrides the error, and instead prints a warning as it does when installing .app's with --force.

reitermarkus commented 4 years ago

I think for binaries we should only override:

vitorgalvao commented 4 years ago

Agreed with @reitermarkus. Even with --force we shouldn’t take the risk of irreversibly deleting a user script or breaking other tools that depend on it.

tiiiecherle commented 4 years ago

Thanks for looking into this.

I don't know much about the background code but for the user using --force in my opinion should really force an override.

I don't know if @reitermarkus's suggestion would solve the following problem, if yes, it is ok for me. I'm using --force in my own update script and therefore --force should lead to always having all app related files in the latest version and making the install/update succeed. This worked for the last years without problems.

I checked for the nextcloud and chromium cask that are currently failing to update with --force for me. The error files (/usr/local/bin/nextcloudcmd and /usr/local/bin/chromium) are both symlinks. I don't know if there are other casks with other issue possibilities regarding this.

Thanks in advance for working on the fix.

tiiiecherle commented 4 years ago

Can someone please explain why "not overwriting" is preferred if the conflicting name/path is a file.

  1. I would expect to overwrite if I use --force.
  2. The result of using --force for an update should be all files updated to the latest version.

Thanks

vitorgalvao commented 4 years ago

Can someone please explain why "not overwriting" is preferred if the conflicting name/path is a file.

https://github.com/Homebrew/homebrew-cask/issues/88401#issuecomment-683410923

tiiiecherle commented 4 years ago

@vitorgalvao Thanks, I already read that but I don't know exactly what that means. Do you mean it could possibly overwrite a file that doesn't even belong to the referring cask?

Is it not the way it has ever been until a few days ago to overwrite the conflicting files using --force?

vitorgalvao commented 4 years ago

Do you mean it could possibly overwrite a file that doesn't even belong to the referring cask?

Yes.

Is it not the way it has ever been until a few days ago to overwrite the conflicting files using --force?

I no longer recall.