Adjusting the env when SmartGit loads

12 views
Skip to first unread message

Infinite Persistence

unread,
Oct 27, 2024, 1:02:44 PM10/27/24
to SmartGit
When SmartGit loads, is there a way to call a script to adjust its environment, similar to how `.bashrc` does it for terminals?

------------------

Specifically, I am facing the follow issue with husky ...
Screenshot 2024-10-24 160024.png
... where it could not find `npx`. I think it's not just a matter of finding the binary (I did try adding a symbolic link), but some script needs to be run first for everything to function correctly. The following is what's in my `.bashrc`:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

In a regular terminal, the husky command works during commit, but not through SmartGit.

p/s: Usually, I would add that code snippet into the husky script, but for most projects, I am not the maintainer, so it is not possible.

Thanks.

syntevo Support

unread,
Oct 28, 2024, 10:42:22 AM10/28/24
to smar...@googlegroups.com
Hi,

Generally, this idea sounds interesting. However, I only could imagine that it solves the problem of special environments only for Linux, but not for macOS.

--
Best regards,
Thomas Singer
syntevo GmbH
https://www.syntevo.com
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/smartgit/10ac7186-21cf-42f7-b757-b30e0cf0d1a1n%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages