Sublime Forum

Build System to run in cmd.exe

#1

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?

0 Likes

#2

ST2 couldn’t find “node” binary.

If you want to run this build through cmd, you must add

"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

0 Likes

#3

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.

0 Likes

#4

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++

http://termisoc.org/wiki/uploads/d/d3/Scrn1.jpg
http://termisoc.org/wiki/uploads/a/a5/Scrn2.jpg

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.

0 Likes