Skip to content

Commit 47ef1a3

Browse files
authored
Merge pull request #19218 from Homebrew/artifact_installer_sudo
cask/artifact/installer: don't reset uid if sudo is used.
2 parents 573e994 + e227663 commit 47ef1a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/cask/artifact/installer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def install_phase(command: nil, **_)
3030
env: { "PATH" => PATH.new(
3131
HOMEBREW_PREFIX/"bin", HOMEBREW_PREFIX/"sbin", ENV.fetch("PATH")
3232
) },
33-
reset_uid: true,
33+
reset_uid: !args[:sudo],
3434
)
3535
end
3636
end

0 commit comments

Comments
 (0)