Sourcing files before launch

Is it possible to source files prior to a run on a remote server? I've been playing with the Before Launch as part of the Run/Debug Configurations.

I've been trying to add a remote external tool, but since source is a built-in of bash and not an actual binary it throws a no such file or directory error. Let me know if that's an incorrect assumption.

Basically I'm trying to load our testing infrastructure before I run remotely on the server which is normally done by doing this on the command line before you run.
$ source ~/test/setup

This basically edits PATH and adds a ton of different environment variables which ultimately leads to some shell commands being ran in my python script and those commands will not work without sourcing in the setup.

Unfortunately on this particular machine, there is only 1 login, so using the .bashrc is not a solution since not all users will need this particular setup.
1 comment

Wow. no love for this question. I shall start a new one.


Please sign in to leave a comment.