Starting Nov 7, a number of the jobs I would run through Toolforge grid
have stopped working. Each job consists of a .sh file like this
on the first line of which I use the source command to activate a python
virtual environment. When I run source by hand, subsequent lines work. But
when I call the .sh file and it tries to run the source command, I get a
"source: not found" message, the virtual environment does not get activated
and indeed running *which python* returns */usr/bin/python* which is bad.
All my scripts depend on pip packages that are installed in the virtual env
and not available with the system python.
The main thing I did on Nov 7 was to add a line at the end of my too's
account's .bash_profile as below:
This is because when I manually log into toolforge, I would like zsh to be
my shell, and since tool accounts don't support chsh, I thought executing
zsh directly from bash would be okay. But apparently, that now breaks the
source command somehow.
So I wonder:
(a) Is there a way to properly change the default shell of tool accounts?
(b) Is there a way to make *source* work under zsh?
Importantly, I know the problem is with *exec zsh* because once I removed
it and logged out and back in, all scripts worked correctly.