Solvedhomebrew cask brew cask zap command failed and the output is weird

General troubleshooting steps

Description of issue

The command brew cask zap failed and the output is weird.
I have installed CommandLineTools on this machine (macOS Catalina v10.15.4)

Command that failed

brew cask zap fork

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

 brew cask zap fork --force --verbose --debug
==> Zapping Cask fork
==> Implied "brew cask uninstall fork"
==> Uninstalling artifacts
==> 3 artifact/s defined
#<SortedSet: {#<Cask::Artifact::App:0x00007f971ebe0b60 @cask=#<Cask::Cask:0x00007f971f1b8768 @token="fork", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb>, @tap=#<Tap:0x00007f971f189cb0 @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:0x00007f971f1b8240@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/fork>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/fork/.metadata>, @config=#<Cask::Config:0x00007f971eb82150 @default={:appdir=>#<Pathname:/Applications>, :prefpanedir=>#<Pathname:/Users/loyalsoldier/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/loyalsoldier/Library/QuickLook>, :dictionarydir=>#<Pathname:/Users/loyalsoldier/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/loyalsoldier/Library/Fonts>, :colorpickerdir=>#<Pathname:/Users/loyalsoldier/Library/ColorPickers>, :servicedir=>#<Pathname:/Users/loyalsoldier/Library/Services>, :input_methoddir=>#<Pathname:/Users/loyalsoldier/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/loyalsoldier/Library/Screen Savers>}, @env={}, @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007f971eb808c8 @cask=#<Cask::Cask:0x00007f971f1b8768 ...>, @token="fork", @version="1.0.91.1", @sha256="5e8c023bdee75c0df557d84051a616bdad14917e809b99e3e99cf7d667ca227e", @url=#<URL:0x00007f971eb802b0 @uri=#<URI::HTTPS https://forkapp.ams3.cdn.digitaloceanspaces.com/mac/Fork-1.0.91.1.dmg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f971eb73948 @uri=#<URI::HTTPS https://git-fork.com/update/feed.xml>, @parameters={}>, @name=["Fork"], @homepage="https://git-fork.com/", @auto_updates=true, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/fork/1.0.91.1>, @language=nil>>, @source_string="Fork.app", @target_string="", @source=#<Pathname:/usr/local/Caskroom/fork/1.0.91.1/Fork.app>, @target=#<Pathname:/Applications/Fork.app>>, #<Cask::Artifact::Binary:0x00007f971ebd1868 @cask=#<Cask::Cask:0x00007f971f1b8768 @token="fork", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb>, @tap=#<Tap:0x00007f971f189cb0 @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:0x00007f971f1b8240@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/fork>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/fork/.metadata>, @config=#<Cask::Config:0x00007f971eb82150 @default={:appdir=>#<Pathname:/Applications>, :prefpanedir=>#<Pathname:/Users/loyalsoldier/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/loyalsoldier/Library/QuickLook>, :dictionarydir=>#<Pathname:/Users/loyalsoldier/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/loyalsoldier/Library/Fonts>, :colorpickerdir=>#<Pathname:/Users/loyalsoldier/Library/ColorPickers>, :servicedir=>#<Pathname:/Users/loyalsoldier/Library/Services>, :input_methoddir=>#<Pathname:/Users/loyalsoldier/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/loyalsoldier/Library/Screen Savers>}, @env={}, @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007f971eb808c8 @cask=#<Cask::Cask:0x00007f971f1b8768 ...>, @token="fork", @version="1.0.91.1", @sha256="5e8c023bdee75c0df557d84051a616bdad14917e809b99e3e99cf7d667ca227e", @url=#<URL:0x00007f971eb802b0 @uri=#<URI::HTTPS https://forkapp.ams3.cdn.digitaloceanspaces.com/mac/Fork-1.0.91.1.dmg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f971eb73948 @uri=#<URI::HTTPS https://git-fork.com/update/feed.xml>, @parameters={}>, @name=["Fork"], @homepage="https://git-fork.com/", @auto_updates=true, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/fork/1.0.91.1>, @language=nil>>, @source_string="/Applications/Fork.app/Contents/Resources/fork_cli", @target_string="fork", @source=#<Pathname:/Applications/Fork.app/Contents/Resources/fork_cli>, @target=#<Pathname:/usr/local/bin/fork>>, #<Cask::Artifact::Zap:0x00007f971ebc3330 @cask=#<Cask::Cask:0x00007f971f1b8768 @token="fork", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb>, @tap=#<Tap:0x00007f971f189cb0 @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:0x00007f971f1b8240@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/fork.rb:1>, @caskroom_path=#<Pathname:/usr/local/Caskroom/fork>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/fork/.metadata>, @config=#<Cask::Config:0x00007f971eb82150 @default={:appdir=>#<Pathname:/Applications>, :prefpanedir=>#<Pathname:/Users/loyalsoldier/Library/PreferencePanes>, :qlplugindir=>#<Pathname:/Users/loyalsoldier/Library/QuickLook>, :dictionarydir=>#<Pathname:/Users/loyalsoldier/Library/Dictionaries>, :fontdir=>#<Pathname:/Users/loyalsoldier/Library/Fonts>, :colorpickerdir=>#<Pathname:/Users/loyalsoldier/Library/ColorPickers>, :servicedir=>#<Pathname:/Users/loyalsoldier/Library/Services>, :input_methoddir=>#<Pathname:/Users/loyalsoldier/Library/Input Methods>, :internet_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Internet Plug-Ins>, :audio_unit_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/Components>, :vst_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST>, :vst3_plugindir=>#<Pathname:/Users/loyalsoldier/Library/Audio/Plug-Ins/VST3>, :screen_saverdir=>#<Pathname:/Users/loyalsoldier/Library/Screen Savers>}, @env={}, @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007f971eb808c8 @cask=#<Cask::Cask:0x00007f971f1b8768 ...>, @token="fork", @version="1.0.91.1", @sha256="5e8c023bdee75c0df557d84051a616bdad14917e809b99e3e99cf7d667ca227e", @url=#<URL:0x00007f971eb802b0 @uri=#<URI::HTTPS https://forkapp.ams3.cdn.digitaloceanspaces.com/mac/Fork-1.0.91.1.dmg>, @user_agent=:default, @specs={}>, @appcast=#<Cask::DSL::Appcast:0x00007f971eb73948 @uri=#<URI::HTTPS https://git-fork.com/update/feed.xml>, @parameters={}>, @name=["Fork"], @homepage="https://git-fork.com/", @auto_updates=true, @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/fork/1.0.91.1>, @language=nil>>, @directives={:trash=>["~/Library/Application Support/Fork", "~/Library/Application Support/com.DanPristupov.Fork", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.danpristupov.fork.sfl2", "~/Library/Caches/com.DanPristupov.Fork", "~/Library/Cookies/com.DanPristupov.Fork.binarycookies", "~/Library/Logs/Fork.log", "~/Library/Preferences/com.DanPristupov.Fork.plist", "~/Library/Saved Application State/com.DanPristupov.Fork.savedState", "~/Library/WebKit/com.DanPristupov.Fork"], :signal=>[]}>}>
==> Uninstalling artifact of class Cask::Artifact::App
==> Backing App 'Fork.app' up to '/usr/local/Caskroom/fork/1.0.91.1/Fork.app'.
/bin/cp -pR /Applications/Fork.app /usr/local/Caskroom/fork/1.0.91.1/Fork.app
==> Removing App '/Applications/Fork.app'.
==> Uninstalling artifact of class Cask::Artifact::Binary
==> Unlinking Binary '/usr/local/bin/fork'.
==> Dispatching zap stanza
==> Trashing files:
~/Library/Application Support/Fork
~/Library/Application Support/com.DanPristupov.Fork
~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.danpristupov.fork.sfl2
~/Library/Caches/com.DanPristupov.Fork
~/Library/Cookies/com.DanPristupov.Fork.binarycookies
~/Library/Logs/Fork.log
~/Library/Preferences/com.DanPristupov.Fork.plist
~/Library/Saved Application State/com.DanPristupov.Fork.savedState
~/Library/WebKit/com.DanPristupov.Fork
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift /Users/loyalsoldier/Library/Application\ Support/Fork /Users/loyalsoldier/Library/Application\ Support/com.DanPristupov.Fork /Users/loyalsoldier/Library/Caches/com.DanPristupov.Fork /Users/loyalsoldier/Library/Cookies/com.DanPristupov.Fork.binarycookies /Users/loyalsoldier/Library/Logs/Fork.log /Users/loyalsoldier/Library/Preferences/com.DanPristupov.Fork.plist /Users/loyalsoldier/Library/Saved\ Application\ State/com.DanPristupov.Fork.savedState /Users/loyalsoldier/Library/WebKit/com.DanPristupov.Fork
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
/usr/bin/chflags -R -- 000 '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chflags:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -- u\+rwx '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -N '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod: Failed to clear ACL on file
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
==> Using sudo to gain ownership of path '
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFound
/usr/bin/sudo -E -- /usr/sbin/chown -R -- loyalsoldier '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
Password:
chown:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
/usr/bin/chflags -R -- 000 '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chflags:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -- u\+rwx '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -N '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod: Failed to clear ACL on file
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
/usr/bin/chflags -R -- 000 '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chflags:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -- u\+rwx '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -N '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod: Failed to clear ACL on file
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
==> Using sudo to gain ownership of path '
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFound
/usr/bin/sudo -E -- /usr/sbin/chown -R -- loyalsoldier '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chown:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
/usr/bin/chflags -R -- 000 '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chflags:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -- u\+rwx '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod:
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/bin/chmod -R -N '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
chmod: Failed to clear ACL on file
#import "Headers/CoreFoundation.h"
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h: No such file or directory
/usr/local/Homebrew/Library/Homebrew/cask/utils/trash.swift '
'\#import\ \"Headers/CoreFoundation.h\"'
'\ \ \ \ \ \ \ \ \^'
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
^C

Output of brew cask doctor

brew cask doctor
==> Homebrew Version
2.2.11-56-ged09857
==> macOS
10.15.4
==> SIP
Enabled
==> Java
N/A
==> xattr issues
<NONE>
==> Gatekeeper support
Error: Unknown support status
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3524 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (156 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (950 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers (135 casks)
==> Contents of $LOAD_PATH
/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.38.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.5.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-0.80.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/unicode-display_width-1.6.1/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/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.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-core-3.9.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rspec-support-3.9.2/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/rexml-3.2.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rdiscount-2.2.0.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/rdiscount-2.2.0.1
/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/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parser-2.7.0.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel_tests-2.32.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/parallel-1.19.1/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/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.9/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/nokogiri-1.10.9
/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-3.1.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.2019.1009/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/jaro_winkler-1.5.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/jaro_winkler-1.5.4
/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/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.6/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.6
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/diff-lcs-1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/coveralls-0.8.23/lib
/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/term-ansicolor-1.7.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tins-1.24.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../../../../../../../../Library/Ruby/Gems/2.6.0/gems/sync-0.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-0.16.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/simplecov-html-0.10.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.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/extensions/universal-darwin-19/2.6.0/json-2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/connection_pool-2.2.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ast-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.2.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.6/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.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/x86_64-darwin19
/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/x86_64-darwin19
/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/x86_64-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/zsh"

Output of brew tap

➜ brew tap
beeftornado/rmtree
buo/cask-upgrade
homebrew/bundle
homebrew/cask
homebrew/cask-drivers
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
homebrew/services
vitorgalvao/tiny-scripts
38 Answers

✔️Accepted Answer

I've experienced it too. And it is not the first time that Software Update messed my CLT installation. What always worked for me was:

  1. uninstalling current version (official docs)

    $ sudo rm -rf /Library/Developer/CommandLineTools
    
  2. manually installing newer one from https://developer.apple.com/download/more/

To save you from searching here is a direct link to the latest version: https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_11.4.1/Command_Line_Tools_for_Xcode_11.4.1.dmg

Of course, this only applies if you are using standalone CLT installation, not those bundled with Xcode which is mostly the case here as I can see from your brew config outputs.

Hope it helps 🤞

Other Answers:

Still have the issue. Reopen please.

More Issues: