Sublime Forum

Build System executing 2 commands

#1

I have the below project wide build system.

  "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

0 Likes

#2

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.

0 Likes

#3

Yeah!!

Thanks, that worked a treat.

Here’s what I use:

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

	]
0 Likes