noseglid / atom-build

:hammer: Build your project directly from the Atom editor
https://atom.io/packages/build
MIT License
248 stars 97 forks source link

Output doesn't print until compile is finished #480

Closed pokepleb closed 7 years ago

pokepleb commented 7 years ago

Hey first of thanks for the great package. I have created a simple custom build to build my Lua projects with LuaJIT. It all works fine but the only problem I have is that the console output doesn't print until the compile is finished.

Below is my .atom-build.json file.

{ "cmd": "luajit", "cwd": "{FILE_ACTIVE_PATH}", "name": "LuaJIT", "args": ["{FILE_ACTIVE}"], "sh": false, "atomCommandName": "build:luajit" }

Running from windows command prompt the same command (for example "luajit filepath.lua") prints the output correctly as it happens, but in the atom-build console it only prints the whole output when the compile is finished.

How can I fix this?

Thanks

noseglid commented 7 years ago

The build package does indeed support printing lines as they come out. I'm guessing the command doesn't print until it's all done when run via atom-build (which does not allocate a tty - contrary to a terminal emulator). Are there any options to luajit to force it to output regardless of that?