howl-editor / howl

The Howl Editor
http://howl.io
Other
712 stars 68 forks source link

project-build runs command on global scope instead of file scope #403

Closed tuffnerdstuff closed 6 years ago

tuffnerdstuff commented 6 years ago

howl version: 0.5.1

I've set a build command for in the config file (~/-howl/init.moon) for a certain file scope like this:

c = howl.config.for_file '/home/stefan/Development/skifoan' c.project_build_command = 'optirun love .' c.indent = 4

When I check the variable in howl everything looks fine:

screenshot_20171230_222425

But when I run the project-build or use the hotkey ctrl_shift_b, then howl always runs the global command make instead of the more specific one optirun love ..

refi64 commented 6 years ago

Whoops, I think I know what the problem here is...

Fix incoming shortly.

refi64 commented 6 years ago

Meanwhile, try changing lib/howl/commands/app_commands.moon line 422 from:

    handler: -> launch_cmd get_project_root!, config.project_build_command

to:

handler: -> launch_cmd get_project_root!, (app.editor and app.editor.buffer.config or config).project_build_command
tuffnerdstuff commented 6 years ago

Thanks for the fast response! your suggested patch works for me!