From e227663207b3011e4e244ede5c4a9036e087096d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 3 Feb 2025 16:57:31 +0100 Subject: [PATCH] cask/artifact/installer: don't reset uid if sudo is used. This fixes handling `sudo` and EUID when using certain `script` commands on casks e.g. adobe-creative-cloud. Co-Authored-By: Bo Anderson --- Library/Homebrew/cask/artifact/installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index 9033160770..43e042e5d1 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -30,7 +30,7 @@ module Cask env: { "PATH" => PATH.new( HOMEBREW_PREFIX/"bin", HOMEBREW_PREFIX/"sbin", ENV.fetch("PATH") ) }, - reset_uid: true, + reset_uid: !args[:sudo], ) end end