radicle-jetbrains-plugin icon indicating copy to clipboard operation
radicle-jetbrains-plugin copied to clipboard

Git push to different RAD_HOME

Open Stelios123 opened this issue 1 year ago • 1 comments

When RAD_HOME is anything but the default, the git process started by IntelliJ ignores the RAD_HOME configured in the IDE.

All git operations of the radicle-remote-helper should take that into account, so we need to find out a way to pass this information to spawned git processes.

Stelios123 avatar Jan 04 '24 08:01 Stelios123

Let's check whether this will work by passing RAD_HOME as an environment variable to IntelliJ (vmoptions or something)

gsaslis avatar May 10 '24 07:05 gsaslis

https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties

gsaslis avatar Jun 04 '24 09:06 gsaslis

Let's fix this for linux and mac at least and just investigate and document whether it is possible for windows.

gsaslis avatar Jun 07 '24 09:06 gsaslis

An update on this after spending some time investigating the situation. Custom VM options is not helping (in any OS), as we need to set an env var (not system properties), which is also not at all needed within the IDE itself, but is passed on to spawned git process. Possible solutions include:

  • Custom git process, i.e. replaced by a script that exports necessary env vars and then delegates to the real git. This sounds very promising for Windows, as well.
  • Asking the user to set up the env vars in their .profile (and rebooting). These env vars will be picked up by any running process (including spawned non-interactive git). Unsure for windows.

JChrist avatar Jun 12 '24 06:06 JChrist

the .profile route sounds like a good-enough compromise, considering that most people will just use the default RAD_HOME. We now have a way for the plugin to work for the ones who don't as well, so let's just go with that.

  • Add a note in the README
  • inform them in the settings when they pick a non-default RAD_HOME.

gsaslis avatar Jun 12 '24 06:06 gsaslis