19
8
I have the following build script for my JavaScript files in Sublime Text 3.
{
"shell_cmd": "node --harmony --use-strict --harmony_generators $file"
}
The problem is that when node returns an error, for some reason Sublime will spew out the path, which does not line-wrap, and pollutes the output.
C:\Users\JFD\Desktop\playground.js:2
console.log(b); // ReferenceError: a is not defined
^
ReferenceError: b is not defined
at Object.<anonymous> (C:\Users\JFD\Desktop\playground.js:2:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Function.Module.runMain (module.js:490:10)
at startup (node.js:119:16)
at node.js:827:3
[Finished in 0.1s with exit code 8]
[shell_cmd: node --harmony --use-strict --harmony_generators C:\Users\JFD\Desktop\playground.js]
[dir: C:\Users\JFD\Desktop]
[path: C:\Program Files (x86)\Microchip\xc8\v1.11\bin;C:\Program Files (x86)\CMake 2.8\bin;C:\MinGW\bin;C:\yagarto4.6.0\bin;C:\Python26\;C:\Python26\Scripts;C:\Program Files (x86)\Altium Designer S09 Viewer\System;C:\PROGRA~2\MpAM;C:\windows\system32;C:\Program Files\nodejs\;C:\Cadence\SPB_16.6\tools\bin;C:\Cadence\SPB_16.6\tools\libutil\bin;C:\Cadence\SPB_16.6\tools\fet\bin;C:\Cadence\SPB_16.6\tools\specctra\bin;C:\Cadence\SPB_16.6\tools\pcb\bin;C:\Cadence\SPB_16.6\openaccess\bin\win32\opt;C:\Cadence\SPB_16.6\tools\capture;C:\Users\JFD\AppData\Roaming\npm\;c:\altera\12.1\modelsim_ase\win32aloem;c:\altera\12.1sp1\modelsim_ase\win32aloem;c:\altera\12.1sp1\modelsim_ae\win32aloem]
How can I ask Sublime to not output the path?
Instead of disabling the path output, you can disable word wrap in the build output window. Make sure the build window is active, then do
View -> Word Wrap
to disable it. Though not a perfect solution, it's much simpler than modifying Sublime Text's internals. – anishpatel – 2017-05-14T21:09:18.667I think this is just part of the standard error/debugging output. I don't know of any way to disable it through options or build flags, though... – MattDMo – 2013-07-09T16:03:41.950