anticoders / gagarin

Another testing framework for your meteor apps.
gagarin.meteor.com
MIT License
150 stars 21 forks source link

Exception when running as a cron task #151

Open ArtemKo7v opened 8 years ago

ArtemKo7v commented 8 years ago

I wrote a separate shell script to run gagarin. It runs well when it is manually called from command-line. But it throws an exception when running from crontab with root privilegies:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
  at errnoException (child_process.js:1011:11)
  at Process.ChildProcess._handle.onexit (child_process.js:802:34)

As I understand, it happens because of the incorrect node environment in child_process.spawn

apendua commented 8 years ago

Yes, probably. But I would gess you're getting this error because of meteor command not being accessible by the root user. Do you think it's possible?

ArtemKo7v commented 8 years ago

@apendua Yes, that was what caused the problem, many thanks!

apendua commented 8 years ago

Let's not close this issue. This will probably need to be properly documented anyway.