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

Command triggered multiple times #525

Open Jesus89 opened 7 years ago

Jesus89 commented 7 years ago

Hi, I open this issue, related to https://github.com/noseglid/atom-build/issues/419.

It seems that a command is being registered multiple N times (N is the Opened Project Folders). This is not a desired behavior because the command is applied only to the active path. Also, when a project folder is removed the command is triggered still N times.

I attach this little project to check the issue: https://github.com/Jesus89/atom-build-test.

Thanks!

noseglid commented 6 years ago

I see.. this is "by design", but arguably the design of atomCommandName is a bit faulty when it comes to multiple project folders.

Not sure what to do in this case. Reject registering a command name if it already exists?

Jesus89 commented 6 years ago

I think it would be nice to run only the commands registered with the cwd that contains the current active path.