AdoptOpenJDK / homebrew-openjdk

AdoptOpenJDK HomeBrew Tap
Apache License 2.0
1.82k stars 102 forks source link

JDK11 tap calls sudo despite brew prefix in $HOME #118

Closed JeffCarpenter closed 5 years ago

JeffCarpenter commented 5 years ago

I have my brew prefix set to ~/brew , but brew cask install adoptopenjdk11 runs this command: /usr/bin/sudo -E -- env LOGNAME=jeff USER=jeff USERNAME=jeff /usr/sbin/installer -pkg /Users/jeff/brew/Caskroom/adoptopenjdk11/11,0.3:7/Open JDK11U-jdk_x64_mac_hotspot_11.0.3_7.pkg -target /

VonUniGE commented 5 years ago

@JeffCarpenter As I understand brew --prefix set the location for homebrew formulas not for homebrew casks. If you install any other cask such as yed it will not be installed in ~/brew, isn'it?

JeffCarpenter commented 5 years ago

I installed three other casks (font-firacode-nerd-font, font-hack and macpass) that way and they installed to ~/brew/Caskroom

JeffCarpenter commented 5 years ago

That being said, I don't know if it's possible to make a pkg that can be installed without admin rights.

karianna commented 5 years ago

@JeffCarpenter Is it where it is installing the pkg or the contents of the pkg (once it's run) that concerns you? Java is a bit of a special case in that Mac OS X expects all Java installs to sit in the /Libraray/java/JavaVirtualMacghines/.... structure (which our homebrew pkg extracts to).

JeffCarpenter commented 5 years ago

It's the installation. If installing to /Library/java/JavaVirtualMachines/ is the law of the land for OS X, then I suppose this isn't really a bug.

karianna commented 5 years ago

Yeah it is the strongly recommended law of the land