why can't upstart run 'source bin/activate'?

Calum picture Calum · Feb 12, 2013 · Viewed 8.5k times · Source

upstart won't activate my virtualenv for some reason.

This is how I run it

script
    # My startup script, plain old shell scripting here.
    cd path/to/env
    source bin/activate
    ....
end script

the virtualenv runs fine when started manually

Why does this not work?

Answer

Calum picture Calum · Feb 12, 2013

So I've worked it out, for some reason upstart doesn't like using 'source' so I changed the line from:

source bin/activate

to

. bin/activate

and that works, don't know why though, so would be interested if someone could explain this