Home Download Buy Blog Forum Support

Build System to run in cmd.exe

Build System to run in cmd.exe

Postby Francisc on Thu Jun 28, 2012 11:39 am

Hello,

I'm trying to create a Build System that runs Node in cmd.exe instead of the python console.

{
"windows":{
"cmd":["node","$file"],
"selector":"source.js",
"path":"C:\\Windows\\system32\\cmd.exe"
}
}

When trying to build, it's saying that "[Error 2] The system cannot find the file specified".

How can I fix this please?
Francisc
 
Posts: 55
Joined: Thu Sep 22, 2011 7:14 pm

Re: Build System to run in cmd.exe

Postby bizoo on Thu Jun 28, 2012 1:00 pm

ST2 couldn't find "node" binary.

If you want to run this build through cmd, you must add
Code: Select all
"shell": true

to your build file (and remove/correct the useless "path" entry).
Or you could put the complete path to node in the "cmd".

http://docs.sublimetext.info/en/latest/reference/build_systems.html
bizoo
 
Posts: 889
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Build System to run in cmd.exe

Postby Francisc on Thu Jun 28, 2012 3:48 pm

The result is similar to using no path or shell:
It does launch Node, but not in it's own cmd.exe window.

Is it possible to tell the Build System to run node $file in a new instance of a cmd.exe window?

Thanks.
Francisc
 
Posts: 55
Joined: Thu Sep 22, 2011 7:14 pm

Re: Build System to run in cmd.exe

Postby zig13 on Thu Feb 28, 2013 5:03 pm

This is exactly what I want too. The guide for making custom builds seems to indicate that "shell": "true" with cause the interpreter to be launched in a separate window but nothing changes. My project is a text-based adventure game and so to test it I require an interactive instance of the Python interpreter which the built-in console/build-output is incapable of providing along with being hard to read, obstructing and not consistent with what my users will see.

Currently I use the PyNPP plugin for Notepad++

Image
Image

When I am done looking the output I can simply exit the command prompt and go back to the code.

I am in love with some of the features of Sublime Text and really want to invest in it as my primary development environment but the lack of this capability is holding me back.
zig13
 
Posts: 1
Joined: Thu Feb 28, 2013 4:52 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 32 guests