cursive
cursive copied to clipboard
Respect IntelliJ PATH variables when running leiningen tasks
It looks like PATH variables are not applied to all shell interactions done by Cursive
Shortly after opening a project with particular project.clj, the IDE reports unhandled exception. The problem is leiningen code choking on LEIN_SNAPSHOTS_IN_RELEASE error.
Recently I was forced to use a SNAPSHOT-dependency on specter library. This started those LEIN_SNAPSHOTS_IN_RELEASE issues. I could set LEIN_SNAPSHOTS_IN_RELEASE in my bash shell environment to silent it on command-line, but that does not apply to GUI apps like IntelliJ.app.
Using PATH variables would be convenient here, but didn't work in this particular case.
I had to resort to launchctl setenv LEIN_SNAPSHOTS_IN_RELEASE 1, which is global and does some magic. Once I set it I wasn't able to unsetenv-it. Maybe after restart? Anyways. I have a workaround to my particular issue.
In this report I'm asking for Cursive code review and making sure that all shell or leiningen library interactions respect PATH variables from IntelliJ.
macOS 10.12
Cursive 1.4.0-eap3-2016.3
IntelliJ IDEA 2016.3 EAP
Build #IU-163.6512.17, built on October 19, 2016
Expiration date: November 18, 2016
JRE: 1.8.0_112-release-b403 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
https://www.jetbrains.com/help/idea/2016.2/path-variables-2.html