Alternative install for macOS
Our macOS environment is restricted from using home-brew. Is there an alternative way to install danger-kotlin on macOS?
Hey 👋🏻 Have you tried
bash <(curl -s https://raw.githubusercontent.com/danger/kotlin/master/scripts/install.sh)
source ~/.bash_profile
?
Whoosh thanks for your quick response. This is another issue, we do not have administrator access on most of the machines, developers are assigned to the _developer group
sudo dscl . append /Groups/_developer GroupMembership <username>
which is usually enough for us.
So the install.sh way did not sadly work out as expected:
checkdir error: cannot create /usr/local/kotlinc
Permission denied
🤔
https://github.com/danger/kotlin/blob/master/scripts/install.sh#L33-L48
if you install koltinc and gradle yourself it shouldn't try to install those during the script, so that might avoid that issue
Perfect I will verify, why it could not find it in the path.
BTW: Did you thought about using ~/.profile instead of the shell specific profile for initialisation?
Also faced with the problem. In my case I do the next steps to install kotlin-danger on Mac OS:
git clone https://github.com/danger/kotlin.git --branch 1.2.0 --depth 1 _danger-kotlincd _danger-kotlin- Find a directory with JDK 17 with command
/usr/libexec/java_home -v 17 - Open to edit Makefile
- Add in the top of Make file line like
export JAVA_HOME=/path/from/step3 - Run
make install
During the installation I also faced with two another troubles:
- It was unable to install libffi. So I just installed it manually with command
brew install libffi - I got an error
ld: unknown options: -sdk-version. As I know this error occurs on Mac OS after update xCode to version 15. To fix it I found theexecutable()string in filedanger-kotlin/build.gradle.ktsand replace it with the code below:
executable {
linkerOpts += "-ld64"
}