tartley/rerun2

Not executing command

oliviercailloux opened this issue · 4 comments

Hi,
Thanks for this, looks like a great utility. But it doesn’t work for me.
I saved rerun in my working directory, then chmod u+x rerun.
Then ./rerun date.
It prints the date and waits.
I open a file in that same working directory using gedit (from nautilus), modify the file and save. Nothing happens in the terminal.
How can I debug this?

Hi. Sorry to hear that. Trying to reproduce now...

Hmm. It works for me using gedit from nautilus. I wonder what else it could be?

Presumably you also tried other ways of editing a file (eg. create a new folder in nautilus.) although I can't imagine this is really the issue.

Sanity check: You're sure the terminal and nautilus are in the same directory (sorry.)

Passing --verbose to rerun before the command outputs some info (but only when it receives filesystem events, so that's not likely to help)

You could try a simplified version of the 'inotifywait' command that's at the heart of 'rerun2':

inotifywait --recursive --monitor . | while read changed 
> do
> echo $changed
> done

That should output more info, and respond to more types of filesystem events than rerun2 does.

If that outputs info in response to changing files, then you could try slowly changing that command into the command in rerun2, see at what point it stops seeing the events you're making.

Also: I just realised the version of rerun2 on my disk had local diffs. The edits were from months ago, I don't remember what it was I fixed, but I just pushed the changes. (including renaming the file to rerun2 - I also have a different project that is called 'rerun', which polls file stats instead of using inotify events)

Yes, I was running the terminal and editing the file from the same directory. (You are right, it’s better to ask.)
Something changed in rerun2 that solved the problem: with rerun2 it works (with rerun it still doesn’t, same circumstances, same directory, editor and terminal).
Thanks for the fix.