def perform_action(self, action):
name = action.get("name")
command = action.get("command")
if not command:
print 'Action ' + name + ': No command supplied'
wd = action.get("working_dir")
print 'Performing action: ' + name + ' (' + command + ') in ' + os.getcwd()
subprocess.Popen(command, cwd=wd, shell=True)
In this particular case, the working directory is
and the command is
It may make a difference that I'm using RVM and have a trusted .rvmrc in this directory. The rake task works if I run it on the command line myself.
In addition to the subprocess.Popen you see here, I've also tried os.system, subprocess.call, and something else that I can't now remember. I've searched around on this forum, as well as Google, and have tried the various nuggets that apparently work for other people.
I'd be extremely appreciative if someone could show me what I'm doing wrong.
EDIT: I'm on Mac OS X 10.7.3 and ST2 2178.