guardian
guardian copied to clipboard
processing executable files
Is there any specific reason why executable files have to be excluded from processing by guardian (https://github.com/f/guardian/blob/master/src/guardian/watcher.cr#L57)?
I have a repo with some very simple Crystal programs (tasks for AdventOfCode) that I've all marked executable (with the hashbang line #!/usr/bin/env crystal run
) so that I can run them from the command line easily, and now I've installed guardian to see if it make things more convenient, but it took me a while to figure out why it didn't work at all when I told it to watch ./**/*.cr
...
I guess this was added to prevent execution loops caused by newly created executables like crystal usually does. I'll add an option to include executable files later, it's a use case some people have i guess.
Ah, good point. This only really applies to files without extensions, but they may be caught accidentally by a lot of rules and it would be hard to detect this automatically. Additional option to include executable files for specific rules only could make sense.
Yeah, exacty my thoughts :)
Any opinions on this @f ?