[Cloud] Re: Source command not working with zsh

2021-11-12 Thread Huji Lee
I had the chance to try out these options. *YiFei *was right in that the scripts, when invoked by crontab after zsh was activated, were being invoked by sh and that was why the *source* command was not working. Using . (dot) would resolve the issue on command line, but I cannot tell jsub to use d

[Cloud] Re: Source command not working with zsh

2021-11-12 Thread Roy Smith
Actually, now that I think about it more, in a remote execution environment, it's possible that by the time the script gets run, it's not even running on the same machine, which means it'll have its own /tmp. If that's the case, then my next thought is a NFS path to your home directory which is

[Cloud] Re: Source command not working with zsh

2021-11-12 Thread Huji Lee
Those are both great ideas! Let me explore more. Just briefly to respond to YiFei: I call the scripts from cronjobs (see here ) which makes me think your intuition is right and they are being called by / and not

[Cloud] Re: Source command not working with zsh

2021-11-12 Thread Roy Smith
When I can't figure out WTF is going on with a shell script, I put something like this in the front of it: /usr/bin/env > /tmp/this-is-my-environment No matter how screwed up your env, path, choice of shell, output redirection, etc are, that's pretty much guaranteed to dump some useful informat

[Cloud] Re: Source command not working with zsh

2021-11-12 Thread YiFei Zhu
On Thu, Nov 11, 2021 at 3:57 PM Huji Lee wrote: > > Hi all, > > 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