Homebrew-cask: brew cask upgrade / install fails with quarantine error

Created on 1 Sep 2018  Β·  20Comments  Β·  Source: Homebrew/homebrew-cask

General troubleshooting steps

Description of issue

Cask upgrade fails for any cask that has an update. Installing a cask also fails with similar message. I've tried to install whatsapp for example. I tried to remove macupdate first and then reinstalled, which hasn't helped. I followed all the directions above best i could. If I missed anything please let me know. I Googled to see if this was posted before and and came up empty.

Command that failed

β—‹ β†’ brew cask upgrade vlc
==> Upgrading 1 outdated package, with result:
vlc 3.0.4
==> Satisfying dependencies
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying checksum for Cask vlc
==> Starting upgrade for Cask vlc
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
==> Removing App '/Applications/VLC.app'.
==> Unlinking Binary '/usr/local/bin/vlc'.
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
mkbom -s -i /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-1d0ezv4.list -- /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-6ealqr.bom
ditto --bom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23865-6ealqr.bom -- /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f/dmg.lT9mco /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0
diskutil eject /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-tvq29f/dmg.lT9mco
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23865-f0bka0/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
==> Purging files for version 3.0.4 of Cask vlc
==> Purging files for version 3.0.4 of Cask vlc
Warning: Reverting upgrade for Cask vlc
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
Error: Failed to quarantine one or more files within /usr/local/Caskroom/vlc/3.0.4.

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

β—‹ β†’ brew cask upgrade vlc --force --debug --verbose
==> Upgrading 1 outdated package, with result:
vlc 3.0.4
==> Started upgrade process for Cask vlc
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Downloaded to -> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying download
==> Determining which verifications to run for Cask vlc
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask vlc
==> SHA256 checksums match
==> Starting upgrade for Cask vlc
==> Un-installing artifacts
==> 4 artifact/s defined
#<SortedSet:0x000000010137c858>
==> Un-installing artifact of class Hbc::Artifact::PreflightBlock
==> Un-installing artifact of class Hbc::Artifact::App
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
/bin/cp -pR /Applications/VLC.app /usr/local/Caskroom/vlc/3.0.3/VLC.app
==> Removing App '/Applications/VLC.app'.
==> Un-installing artifact of class Hbc::Artifact::Binary
==> Unlinking Binary '/usr/local/bin/vlc'.
==> Hbc::Installer#stage
hdiutil imageinfo /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Extracting primary container
==> Using container class UnpackStrategy::Dmg for /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
find . -print0
mkbom -s -i /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-14c93na.list -- /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-10beo5c.bom
ditto --bom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-23180-10beo5c.bom -- /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s/dmg.TRCZOV /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync
diskutil eject /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-8wxp6s/dmg.TRCZOV
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-23180-1m20ync/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Propagating quarantine from /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg to /usr/local/Caskroom/vlc/3.0.4
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -w -rs com.apple.quarantine 0081\;5b8aa63e\;Homebrew-Cask\;D59ABDBE-93B7-4B30-ACFD-01CACE2DF374 /usr/local/Caskroom/vlc/3.0.4
==> Purging files for version 3.0.4 of Cask vlc
==> Purging files for version 3.0.4 of Cask vlc
Warning: Reverting upgrade for Cask vlc
==> Installing artifacts
==> 4 artifact/s defined
#<SortedSet:0x000000010137c858>
==> Installing artifact of class Hbc::Artifact::PreflightBlock
==> Installing artifact of class Hbc::Artifact::App
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Installing artifact of class Hbc::Artifact::Binary
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
/bin/ln -h -f -s -- /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh /usr/local/bin/vlc
==> Adding com.apple.metadata:kMDItemAlternateNames metadata
/usr/bin/xattr -p com.apple.metadata:kMDItemAlternateNames /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
==> Existing metadata is: '("vlc"
, "vlc")
'
/bin/chmod -- u\+rw /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
/usr/bin/xattr -w com.apple.metadata:kMDItemAlternateNames \(\(\"vlc\"'
',\ \"vlc\"\)'
',\ \"vlc\"\) /usr/local/Caskroom/vlc/3.0.3/vlc.wrapper.sh
Error: Failed to quarantine one or more files within /usr/local/Caskroom/vlc/3.0.4.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:77:in `propagate'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:191:in `extract_primary_container'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:75:in `stage'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:73:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:33:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/upgrade.rb:33:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:90:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:156:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:161:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:161:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:144:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

Output of brew cask doctor

β—‹ β†’ brew cask doctor
==> Homebrew-Cask Version
Homebrew-Cask 1.7.2-102-g93430e6
Homebrew/homebrew-cask (git revision 8101f; last commit 2018-09-01)
==> macOS
10.14
==> SIP
Enabled
==> Java
N/A
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (4041 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (195 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (152 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/bash"

Output of brew tap

β—‹ β†’ brew tap
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-versions
homebrew/command-not-found
homebrew/completions
homebrew/core
homebrew/services
homebrew/versions
in progress

Most helpful comment

@LanikSJ, if you feel comfortable editing Homebrew's source code...

I'm totally comfortable with Ruby / Python. I wouldn't call myself and expert but I know a thing or two here and there.

β—‹ β†’ brew cask install macupdate --force --verbose --debug
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Migrating cache entries...
No changes to formulae.

==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --location --silent --head https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip.incomplete https://www.macupdate.com/mud-download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.3M  100 11.3M    0     0  16.1M      0 --:--:-- --:--:-- --:--:-- 16.1M
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
Error: undefined local variable or method `quarantine_status' for Hbc::Quarantine:Module
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:35:in `status'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:26:in `detect'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:51:in `quarantine'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:19:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:148:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:64:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:92:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:90:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:156:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:144:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

I was still able to install the above cask using the --no-quarantine option.

I'm sure I speak for most of the Brew users when I say we're all very thankful for what all your maintainers do to keep the project alive. I may not be able to contribute Ruby / Python code (still learning), but I've been known to slay a few shell scripts. If there's anything you guys need or I can help out in any other way just ask. πŸ™‚

All 20 comments

Ping @amyspark.

I couldn't reproduce neither with brew cask upgrade vlc nor with brew cask reinstall vlc.


brew cask update output

amalia@Sakura:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks$ brew cask upgrade vlc
==> Upgrading 1 outdated package, with result:
vlc 3.0.4
==> Satisfying dependencies
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying checksum for Cask vlc
==> Starting upgrade for Cask vlc
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
==> Removing App '/Applications/VLC.app'.
==> Unlinking Binary '/usr/local/bin/vlc'.
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-gklanu /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
mkbom -s -i /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79146-1q674jg.list -- /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79146-125xpzq.bom
ditto --bom /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79146-125xpzq.bom -- /private/var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-gklanu/dmg.w8EcVq /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-lgp4tv
diskutil eject /private/var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-gklanu/dmg.w8EcVq
cp -pR /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-lgp4tv/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
cp -pR /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79146-lgp4tv/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
==> Purging files for version 3.0.3 of Cask vlc
🍺  vlc was successfully upgraded!



brew cask reinstall output

amalia@Sakura:~$ brew cask reinstall vlc --debug
==> Hbc::Installer#reinstall
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Downloaded to -> /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying download
==> Determining which verifications to run for Cask vlc
==> Checking for verification class Hbc::Verify::Checksum
==> 1 verifications defined
Hbc::Verify::Checksum
==> Running verification of class Hbc::Verify::Checksum
==> Verifying checksum for Cask vlc
==> SHA256 checksums match
==> Installing Cask vlc
==> Hbc::Installer#stage
hdiutil imageinfo /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Extracting primary container
==> Using container class UnpackStrategy::Dmg for /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-fj0rng /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
find . -print0
mkbom -s -i /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79914-18atpuf.list -- /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79914-zislez.bom
ditto --bom /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/20180901-79914-zislez.bom -- /private/var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-fj0rng/dmg.KmmKoy /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-1y9bbzx
diskutil eject /private/var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-fj0rng/dmg.KmmKoy
cp -pR /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-1y9bbzx/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
cp -pR /var/folders/l1/b3htrbqd3w3f32x9lk1yll6h0000gn/T/d20180901-79914-1y9bbzx/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg is quarantined
==> Propagating quarantine from /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg to /usr/local/Caskroom/vlc/3.0.4
/usr/bin/xattr -p com.apple.quarantine /Users/amalia/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
/usr/bin/xattr -w -rs com.apple.quarantine 0081\;5b8ad4e9\;Homebrew-Cask\;58A6BE40-DCE8-4F16-8ED1-C617C1325E52 /usr/local/Caskroom/vlc/3.0.4
==> Creating metadata directory /usr/local/Caskroom/vlc/.metadata/3.0.4/20180901182113.269.
==> Creating metadata subdirectory /usr/local/Caskroom/vlc/.metadata/3.0.4/20180901182113.269/Casks.
==> Installing artifacts
==> 4 artifact/s defined
#<SortedSet:0x0000000104117dd0>
==> Installing artifact of class Hbc::Artifact::PreflightBlock
==> Installing artifact of class Hbc::Artifact::App
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Installing artifact of class Hbc::Artifact::Binary
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
/bin/ln -h -f -s -- /usr/local/Caskroom/vlc/3.0.4/vlc.wrapper.sh /usr/local/bin/vlc
==> Adding com.apple.metadata:kMDItemAlternateNames metadata
/usr/bin/xattr -p com.apple.metadata:kMDItemAlternateNames /usr/local/Caskroom/vlc/3.0.4/vlc.wrapper.sh
==> Existing metadata is: ''
/bin/chmod -- u\+rw /usr/local/Caskroom/vlc/3.0.4/vlc.wrapper.sh /usr/local/Caskroom/vlc/3.0.4/vlc.wrapper.sh
/usr/bin/xattr -w com.apple.metadata:kMDItemAlternateNames \(\"vlc\"\) /usr/local/Caskroom/vlc/3.0.4/vlc.wrapper.sh
🍺  vlc was successfully installed!

From the error log, I can say that xattr fails without logging the corresponding error (which should not happen at all, unless... πŸ‘‡ )

Output of brew cask doctor
β—‹ β†’ brew cask doctor
..snip..
==> macOS
10.14
..snip..

@vitorgalvao, this is Mojave (I'm running Sierra). Is there any place where I can get xattr documentation for this version?

Is there any place where I can get xattr documentation for this version?

I’d also like to know. As far as I’m aware, Apple discontinued the online man pages for their CLI tools.

@LanikSJ Mind saving the manpage for us? Do man xattr > xattr_manpage then upload the resulting xattr_manpage file. @amyspark If you do less xattr_manpage on the file, it’ll show with the correct look.

@LanikSJ , you can also work around the error by issuing the --no-quarantine flag:

brew cask upgrade --no-quarantine

@LanikSJ Mind saving the manpage for us? Do man xattr > xattr_manpage then upload the resulting xattr_manpage file. @amyspark If you do less xattr_manpage on the file, it’ll show with the correct look.

Sure I've attached the file.
xattr_manpage.txt

@LanikSJ , you can also work around the error by issuing the --no-quarantine flag

That works no problem:

==> Satisfying dependencies
==> Downloading https://get.videolan.org/vlc/3.0.4/macosx/vlc-3.0.4.dmg
Already downloaded: /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
==> Verifying checksum for Cask vlc
==> Starting upgrade for Cask vlc
==> Backing App 'VLC.app' up to '/usr/local/Caskroom/vlc/3.0.3/VLC.app'.
==> Removing App '/Applications/VLC.app'.
==> Unlinking Binary '/usr/local/bin/vlc'.
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-ba6pwf /Users/LanikSJ/Library/Caches/Homebrew/downloads/68f44e9b95994989831fa4d0d130402a5297584ba02c0645253de135a2a59b87--vlc-3.0.4.dmg
mkbom -s -i /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-47034-8jr33f.list -- /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-47034-1ebxyge.bom
ditto --bom /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/20180901-47034-1ebxyge.bom -- /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-ba6pwf/dmg.f9ysPd /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-1fkf8z0
diskutil eject /private/var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-ba6pwf/dmg.f9ysPd
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-1fkf8z0/VLC.app/. /usr/local/Caskroom/vlc/3.0.4/VLC.app
cp -pR /var/folders/11/kqgth1g965q8pcb7ld1czjsr46_xz_/T/d20180901-47034-1fkf8z0/.background.tiff /usr/local/Caskroom/vlc/3.0.4/.background.tiff
==> Moving App 'VLC.app' to '/Applications/VLC.app'.
==> Linking Binary 'vlc.wrapper.sh' to '/usr/local/bin/vlc'.
==> Purging files for version 3.0.3 of Cask vlc
🍺  vlc was successfully upgraded!

@LanikSJ, if you feel comfortable editing Homebrew's source code: can you edit the line in /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb that reads:

      quarantiner = command.run("/usr/bin/xattr",
                                args: ["-w", "-rs", QUARANTINE_ATTRIBUTE, quarantine_status, to],
                                print_stderr: false)

and replace run by run!? This will crash Cask the moment quarantine fails, but with the advantage that the whole xattr output will be copied to console. My exception handling only prints standard error, which is obviously no help in this case.

@LanikSJ, if you feel comfortable editing Homebrew's source code...

I'm totally comfortable with Ruby / Python. I wouldn't call myself and expert but I know a thing or two here and there.

β—‹ β†’ brew cask install macupdate --force --verbose --debug
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Migrating cache entries...
No changes to formulae.

==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --location --silent --head https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-102-g93430e6-dirty\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip.incomplete https://www.macupdate.com/mud-download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11.3M  100 11.3M    0     0  16.1M      0 --:--:-- --:--:-- --:--:-- 16.1M
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
Error: undefined local variable or method `quarantine_status' for Hbc::Quarantine:Module
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:35:in `status'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:26:in `detect'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:51:in `quarantine'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:19:in `perform'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:148:in `download'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:64:in `fetch'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/installer.rb:92:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:21:in `block in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/install.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli/abstract_command.rb:34:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:90:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:156:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:167:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:144:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:7:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

I was still able to install the above cask using the --no-quarantine option.

I'm sure I speak for most of the Brew users when I say we're all very thankful for what all your maintainers do to keep the project alive. I may not be able to contribute Ruby / Python code (still learning), but I've been known to slay a few shell scripts. If there's anything you guys need or I can help out in any other way just ask. πŸ™‚

I was still able to install the above cask using the --no-quarantine option.

--no-quarantine skips all the Gatekeeper stuff I added (i.e. it lets the Casks be installed the old way).

==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
Error: undefined local variable or method `quarantine_status' for Hbc::Quarantine:Module
Follow the instructions here:
 https://github.com/Homebrew/homebrew-cask#reporting-bugs
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:35:in `status'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:26:in `detect'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:51:in `quarantine'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/download.rb:19:in `perform'

In detect, I use xattr to output the value of the com.apple.quarantine attribute. If it's not set, status would return the empty string, otherwise it would return the value; therefore, quarantine_status is always defined, and this stacktrace makes no sense.

Let's use Homebrew's Ruby interpreter to check what the quarantine module is doing under Mojave. Please clean the modifications you made (cd $(brew --repo); git reset HEAD --hard). Then, run brew irb and try the following lines:

  • Hbc::Quarantine.status("/usr/bin/xattr")
  • Hbc::Quarantine.status("/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip") (or any downloaded file you have at hand)
  • Hbc::Quarantine.detect on the files above

These should return, in order:

  • the empty string
  • the empty string OR a line that looks like "0081;5b8b1b25;Firefox Nightly;BBDF817B-D82B-4BC4-9C39-A1BDDA977B19"
  • false if status returned the empty string, true otherwise.

Let me know if anything is not working as detailed!

Okay here's what I got:

Β± |master βœ“| β†’ brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
irb(main):001:0> Hbc::Quarantine.status("/usr/bin/xattr")
=> ""
irb(main):002:0> Hbc::Quarantine.status("/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip")
=> ""
irb(main):003:0> Hbc::Quarantine.detect
ArgumentError: wrong number of arguments (given 0, expected 1)
    from /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:21:in `detect'
    from (irb):3
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
irb(main):004:0>

Ok, at least the retrieval works correctly (detect needs a path to work, that's why you got an exception).

Please edit the propagate function in quarantine.rb to make it use command.run! (this is essential!). Then, try the following:

  • quarantine file # 1 , e.g.quarantine("/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip")
  • and then propagate(from: file # 1, to: file # 2) where file # 1 is the one you used for quarantine above, and file # 2 is a different file or folder.

See if propagate throws again. If it does attach whatever is logged to console.

Okay I got the first part working:

β—‹ β†’ brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
irb(main):001:0> Hbc::Quarantine.status("/usr/bin/xattr")
=> ""
irb(main):002:0> Hbc::Quarantine.status("/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip")
=> ""
irb(main):003:0> Hbc::Quarantine.detect("/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip")
=> false
irb(main):004:0>

Sadly I got confused on the quarantine function. I was able to edit quarantine.rb but I wasn't able to get any further.

Hopefully this is what you meant:

β—‹ β†’ brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
irb(main):001:0>  Hbc::Quarantine.status("/usr/bin/xattr")
=> ""
irb(main):002:0> Hbc::Quarantine.status("/Users/LanikSJ/Library/Caches/Homebrew/downloads/0a9637121179c6083fdd522acba73af8511948b8c06f87189748e6b86a4f2b88--vault-0.11.0.mojave.bottle.tar.gz")
=> ""
irb(main):003:0> Hbc::Quarantine.detect("/Users/LanikSJ/Library/Caches/Homebrew/downloads/0a9637121179c6083fdd522acba73af8511948b8c06f87189748e6b86a4f2b88--vault-0.11.0.mojave.bottle.tar.gz")
=> false
irb(main):004:0>

@faxotherapy Your bug is different, so please open a new issue. @LanikSJ and @amyspark are debugging, and other messages in the middle will muddle the conversation. Also, your report is incomplete, and by the looks of it you’re not even on Yosemite, which means your OS is way behind what we support. That being the case, your solution is to add export HOMEBREW_CASK_OPTS="--no-quarantine" to your shell’s startup file.

Deleting your message to make the issue tidier. If you’re not behind Yosemite, open the new issue and fill the given template.

@LanikSJ: πŸ‘ I'll clarify.

With a clean HEAD (see my previous comment), run brew cask fetch macdesktop --debug. If should output Quarantining /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip near the end.

With the file successfully downloaded and quarantined, edit quarantine.rb again.
Let file_1 = "/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip". Unzip file_1 somewhere, and copy the resulting path as folder_1.

Finally, go back to brew irb and try:

Hbc::Quarantine.propagate(from: file_1, to: folder_1)

replacing file_1 and folder_1 by the corresponding paths.

If any step throws an exception, paste the output here.

@amyspark I did rebase and pull just to be certain I'm on the latest master.

Β± |master βœ“| β†’ brew cask fetch macupdate --debug
==> Printing caveats
==> Downloading external files for Cask macupdate
==> Downloading https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-112-g0dc2c72\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --location --silent --head https://www.macupdate.com/mud-download
/usr/bin/curl -q --show-error --user-agent Homebrew/1.7.2-112-g0dc2c72\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14\)\ curl/7.54.0 --fail --progress-bar --location --remote-time --continue-at - --output /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip.incomplete https://www.macupdate.com/mud-download
######################################################################## 100.0%
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
/usr/bin/xattr -p com.apple.quarantine /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
==> /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip is not quarantined
==> Quarantining /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/utils/quarantine.swift /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip https://www.macupdate.com/mud-download https://www.macupdate.com/desktop
==> Verifying download
==> Determining which verifications to run for Cask macupdate
==> Checking for verification class Hbc::Verify::Checksum
==> No checksum defined for Cask macupdate, skipping verification
==> 0 verifications defined
==> Success! Downloaded to -> /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip

Unzipped the files into my Downloads folder (created temp) for ease.

Β± |master βœ“| β†’ unzip /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip -d ~/Downloads/temp/
Archive:  /Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip
   creating: /Users/LanikSJ/Downloads/MacUpdate Desktop.app/
   creating: /Users/LanikSJ/Downloads/MacUpdate Desktop.app/Contents/
   creating: /Users/LanikSJ/Downloads/MacUpdate Desktop.app/Contents/_CodeSignature/
  inflating: /Users/LanikSJ/Downloads/MacUpdate Desktop.app/Contents/_CodeSignature/CodeResources
  ...snip...

At first I just ran brew irb as is non modified:

Β± |master βœ“| β†’ brew irb
==> Interactive Homebrew Shell
Example commands available with: brew irb --examples
irb(main):001:0> Hbc::Quarantine.propagate(from:/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip to: /Users/LanikSJ/Downloads/temp/)
SyntaxError: (irb):1: unknown regexp options - rt
(irb):1: syntax error, unexpected tIDENTIFIER, expecting ')'
...0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip to: /U...
...                               ^
(irb):1: syntax error, unexpected tLABEL, expecting end-of-input
...7e1fd--MacUpdateDesktop.zip to: /Users/LanikSJ/Downloads/...
...                               ^
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
irb(main):002:0> Hbc::Quarantine.propagate(from:"/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip", to: "/Users/LanikSJ/Downloads/temp/")
Hbc::CaskQuarantinePropagationError: Failed to quarantine one or more files within /Users/LanikSJ/Downloads/temp/.
    from /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:77:in `propagate'
    from (irb):2
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
  irb(main):003:0>

Then I followed your earlier instructions to change command.run to command.run! in quarantine.rb and I got a bit more info now:
`` Β± |master U:1 βœ—| β†’ brew irb ==> Interactive Homebrew Shell Example commands available with: brew irb --examples irb(main):001:0> Hbc::Quarantine.propagate(from:"/Users/LanikSJ/Library/Caches/Homebrew/downloads/055db22c5f092e7693d69417f62b4e22a0d4ed37c5090a589faf6b224b27e1fd--MacUpdateDesktop.zip", to: "/Users/LanikSJ/Downloads/temp/") ErrorDuringExecution: Failure while executing;/usr/bin/xattr -w -rs com.apple.quarantine 0081\;5b8c242a\;Homebrew-Cask\;9F82ACEA-450D-4B76-8768-0F440C2EB45D /Users/LanikSJ/Downloads/temp/` exited with 64. Here's the output:
option -r not recognized

usage: xattr [-lz] file [file ...]
xattr -p [-lz] attr_name file [file ...]
xattr -w [-z] attr_name attr_value file [file ...]
xattr -d attr_name file [file ...]

The first form lists the names of all xattrs on the given file(s).
The second form (-p) prints the value of the xattr attr_name.
The third form (-w) sets the value of the xattr attr_name to attr_value.
The fourth form (-d) deletes the xattr attr_name.

options:
-h: print this help
-l: print long format (attr_name: attr_value)
-z: compress or decompress (if compressed) attribute value in zip format

from /usr/local/Homebrew/Library/Homebrew/system_command.rb:101:in `assert_success'
from /usr/local/Homebrew/Library/Homebrew/system_command.rb:46:in `run!'
from /usr/local/Homebrew/Library/Homebrew/system_command.rb:23:in `run'
from /usr/local/Homebrew/Library/Homebrew/system_command.rb:27:in `run!'
from /usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/quarantine.rb:71:in `propagate'
from (irb):1
from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'

irb(main):002:0>
`` From the little that I know it looks like you're using/usr/bin/xattr -w -rs com.apple.quarantineand-r` is no longer available in the latest xattr versions. Hope that helps you figure out what's wrong here. Bare with me as I learn a little Ruby debugging. πŸ™‚

@LanikSJ πŸ‘ Indeed! It seems -r is an Apple extension removed post 10.12 (xattr/xattr#55).
@MikeMcQuaid I'll have to do the recursion the Ruby way, it seems? I can add a check in Homebrew/brew#4796, too.

@MikeMcQuaid I'll have to do the recursion the Ruby way, it seems? I can add a check in Homebrew/brew#4796, too.

@amyspark sounds good πŸ‘

have we found a solution to that??? i used brew cask upgrade --no-quarantine , worked once but then when i closed the terminal and tried again it doesnt work anymore

Same here cannot cask any apps anymore
OSX 10.12.5
Always complain about was not quarantined properly (I think it started today as I regularly use cask)...

I got this issue since macOS Mojave update, after reading some relating issues talking about xattr. which recalls that I did manually install xattr by myself sometime ago, because macOS didn't have this command before

After

pip uninstall xattr

brew cask install/upgrade working fine again.

Was this page helpful?
0 / 5 - 0 ratings