Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.24k stars 9.7k forks source link

`cp: invalid option` when trying to update `zoom` cask #17524

Closed frodera closed 4 months ago

frodera commented 4 months ago

Verification

Description of issue

I'm getting the following error (see full output below) when zoom cask is getting upgraded as part of brew upgrade --greedy.

cp: invalid option -- 'c'
Try 'cp --help' for more information.

Workaround: Running brew install zoom got the cask successfully installed.

Command that failed

brew upgrade --greedy

Output of command with --verbose --debug

brew upgrade --greedy
==> Upgrading 2 outdated packages:
font-vollkorn latest -> latest
zoom 6.0.11.35001 -> 6.1.0.35886
==> Upgrading font-vollkorn
==> Cloning https://github.com/google/fonts.git
Cloning into '/Users/my.name/Library/Caches/Homebrew/Cask/font-vollkorn--git-sparse'...
==> Checking out branch main
Already on 'main'
Your branch is up to date with 'origin/main'.
Warning: No checksum defined for cask 'font-vollkorn', skipping verification.
==> Backing Font 'Vollkorn-Italic[wght].ttf' up to '/opt/homebrew/Caskroom/font-vollkorn/latest/ofl/vo
==> Removing Font '/Users/my.name/Library/Fonts/Vollkorn-Italic[wght].ttf'
==> Backing Font 'Vollkorn[wght].ttf' up to '/opt/homebrew/Caskroom/font-vollkorn/latest/ofl/vollkorn/
==> Removing Font '/Users/my.name/Library/Fonts/Vollkorn[wght].ttf'
==> Moving Font 'Vollkorn-Italic[wght].ttf' to '/Users/my.name/Library/Fonts/Vollkorn-Italic[
==> Moving Font 'Vollkorn[wght].ttf' to '/Users/my.name/Library/Fonts/Vollkorn[wght].ttf'
==> Purging files for version latest of Cask font-vollkorn
🍺  font-vollkorn was successfully upgraded!
==> Upgrading zoom
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/6828bb71a9df24821e84fd6af1365
############################################################################################### 100.0%
==> Downloading https://cdn.zoom.us/prod/6.1.0.35886/arm64/zoomusInstallerFull.pkg
############################################################################################### 100.0%
==> Removing launchctl service us.zoom.ZoomDaemon
==> Uninstalling packages with sudo; the password may be necessary:
us.zoom.pkg.videomeeting
==> Removing files:
/Applications/zoom.us.app
/Library/Internet Plug-Ins/ZoomUsPlugIn.plugin
/Library/Logs/DiagnosticReports/zoom.us*
/Library/PrivilegedHelperTools/us.zoom.ZoomDaemon
cp: invalid option -- 'c'
Try 'cp --help' for more information.
==> Purging files for version 6.1.0.35886 of Cask zoom
==> Purging files for version 6.1.0.35886 of Cask zoom
Warning: Reverting upgrade for Cask zoom
==> Running installer for zoom with sudo; the password may be necessary.
installer: Package name is Zoom Workplace
installer: Upgrading at base path /
installer: The upgrade was successful.
==> The Zoom package postinstall script launches the Zoom app
==> Attempting to close zoom.us.app to avoid unwanted user intervention
Error: zoom: Failure while executing; `/usr/bin/env cp -p -c /Users/my.name/Library/Caches/Homebrew/downloads/c3c8b461e29192b98078b729ce71058c61c639ce3c7ca78165e9a6681c974bb3--zoomusInstallerFull.pkg /opt/homebrew/Caskroom/zoom/6.1.0.35886/zoomusInstallerFull.pkg` exited with 1. Here's the output:
cp: invalid option -- 'c'
Try 'cp --help' for more information.

  7.22s user 4.25s system 33% cpu 34.312 total

Output of brew doctor and brew config

% brew config
HOMEBREW_VERSION: 4.3.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e8430b25a1d1321f32e5093d62b57b5cb7cfb3c3
Last commit: 32 hours ago
Core tap JSON: 18 Jun 00:10 UTC
Core cask tap JSON: 18 Jun 00:10 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BAT_THEME: TwoDark
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :0.0
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 3.3.3 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.3/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.45.2 => /opt/homebrew/bin/git
Curl: 8.6.0 => /usr/bin/curl
macOS: 14.5-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false
% brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  kindle

Warning: Some installed kegs have no formulae!
This means they were either deleted or installed manually.
You should find replacements for the following formulae:
  python-pathspec

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  gcal
  openssl@1.1
  terraform
  vault
  youtube-dl

Warning: You have the following deprecated, official taps tapped:
  Homebrew/homebrew-cask-fonts
  Homebrew/homebrew-cask-drivers
Untap them with `brew untap`.

Warning: Putting non-prefixed coreutils in your path can cause GMP builds to fail.

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libzmq.3.dylib

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
  echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc

Output of brew tap

buo/cask-upgrade
d12frosted/emacs-plus
homebrew/cask-drivers
homebrew/cask-fonts
lentil32 commented 4 months ago

My case:

$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus
==> Patching
cp: invalid option -- 'c'
Try 'cp --help' for more information.

If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/d12frosted/homebrew-emacs-plus/issues

Related: https://github.com/d12frosted/homebrew-emacs-plus/issues/688

MikeMcQuaid commented 4 months ago

This is released/fixed in Homebrew 4.3.7 now: https://github.com/Homebrew/brew/releases/tag/4.3.7