Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative install for macOS #225

Open
muellnes opened this issue Jun 1, 2022 · 5 comments
Open

Alternative install for macOS #225

muellnes opened this issue Jun 1, 2022 · 5 comments

Comments

@muellnes
Copy link

muellnes commented Jun 1, 2022

Our macOS environment is restricted from using home-brew.
Is there an alternative way to install danger-kotlin on macOS?

@f-meloni
Copy link
Member

f-meloni commented Jun 1, 2022

Hey 👋🏻
Have you tried

bash <(curl -s https://raw.githubusercontent.com/danger/kotlin/master/scripts/install.sh)
source ~/.bash_profile

?

@muellnes
Copy link
Author

muellnes commented Jun 1, 2022

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

@f-meloni
Copy link
Member

f-meloni commented Jun 1, 2022

🤔

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

@muellnes
Copy link
Author

muellnes commented Jun 1, 2022

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?

@bartwell
Copy link

bartwell commented Dec 9, 2023

Also faced with the problem. In my case I do the next steps to install kotlin-danger on Mac OS:

  1. git clone https://github.com/danger/kotlin.git --branch 1.2.0 --depth 1 _danger-kotlin
  2. cd _danger-kotlin
  3. Find a directory with JDK 17 with command /usr/libexec/java_home -v 17
  4. Open to edit Makefile
  5. Add in the top of Make file line like export JAVA_HOME=/path/from/step3
  6. Run make install

During the installation I also faced with two another troubles:

  1. It was unable to install libffi. So I just installed it manually with command brew install libffi
  2. 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 the executable() string in file danger-kotlin/build.gradle.kts and replace it with the code below:
executable {
     linkerOpts += "-ld64"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants