Home Download Buy Blog Forum Support

Build System executing 2 commands

Build System executing 2 commands

Postby jchannon on Tue Oct 09, 2012 5:34 pm

I have the below project wide build system.

Code: Select all
       
  "build_systems":
   [
      {
         "name": "NodeF1Build",
         "cmd": ["nodemon", "--debug", "$project_path/app.js", "&", "node-inspector"],
           "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
           "selector": "source.js"
      }

   ]


It executes the nodemon --debug myfile.js ok and does not error on the & node-inspector argument but node-inspector is not running. If I type in the terminal nodemon --debug myfile.js & node-inspector they get executed and fire perfectly.

Am I doing something wrong?

Thanks
jchannon
 
Posts: 11
Joined: Sun Oct 02, 2011 4:09 pm

Re: Build System executing 2 commands

Postby sublimator on Tue Oct 09, 2012 7:15 pm

I think you need to put `"shell" : true` at same level as the `name`, `cmd` keys you have there.

That way a shell will process the `&`

Might also need to tweak the `cmd`

Dunno, never use the out of the box build systems really.

Shrug.
It is better to remain silent and be thought a fool, than to speak out and remove all doubt
sublimator
 
Posts: 649
Joined: Thu Mar 20, 2008 5:41 am

Re: Build System executing 2 commands

Postby jchannon on Tue Oct 09, 2012 10:09 pm

Yeah!!

Thanks, that worked a treat.

Here's what I use:

Code: Select all
   "build_systems":
   [
      {
         "name": "NodeF1Build",
         "shell": true,
         "cmd": ["nodemon --debug $project_path/app.js & node-inspector"],
         
           "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
           "selector": "source.js"
      }

   ]
jchannon
 
Posts: 11
Joined: Sun Oct 02, 2011 4:09 pm


Return to General Discussion

Who is online

Users browsing this forum: BestGreek and 46 guests