Add Parameters to wsl Follow
Hello guys, I am developing a plugin for IntelliJ and I have a problem with git. To elaborate a little bit I have a project and I have set my git executable to be //wsl/ubuntu/usr/git. Inside my ~bashrc file on wsl I have some commands that I need to run before git push. If I run from my ubuntu terminal git push, bashrc file loads successfully but from IDE it doesn't. This is the behavior of wsl and the reason is that bashrc loads only for non-login shells. If from my terminal run wsl bash -ic "git push" it loads it again. So is any way to configure this in IntelliJ and add more parameters to wsl command? Under the hood i suspect that when i click git push IntelliJ run wsl git push
Please sign in to leave a comment.
No, wsl arguments are not customizable.
How do you affect `git push` behavior via .bashrc? Some ENV variables for git config?
You can probably try to point IDE git executable to "//wsl/ubuntu/..../git-helper.sh" instead, that would be smth like
Another approach might be replacing "default" "Push" AnAction with another implementation in a plugin.
That implementation might show the dialog you need, send ssh requests before/after/instead the actual push and allow all kinds of necessary modifications (without being constrained by platform API).