Guardfile only be re-evaluated once #566

Closed
ranmocy opened this Issue Feb 28, 2014 · 10 comments

Comments

Projects
None yet
3 participants

ranmocy commented Feb 28, 2014

OS: MacOSX 10.9.2
ruby: ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0]
gem: 2.2.1
guard (2.5.1)
guard-shell (0.6.1)

I test under ~/test(out of Dropbox) with very simple Guardfile like this:

guard :shell do
  watch(/(.*).txt/) {|m| `tail #{m[0]}` }
end

But when I try to modify the Guardfile, it will only be re-evaluated the first time.
Here is the log after I tried to modify about 3 times:

┌─(~/test)(ruby 2.1.0p0)──────────────────┐
└─()─(~ ̄▽ ̄)~>guard -d                       (23:13:10 Feb 27)─┘
23:13:11 - DEBUG - Command execution: uname
23:13:11 - DEBUG - Command execution: sw_vers -productVersion
23:13:11 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
23:13:11 - INFO - Guard is using TerminalNotifier to send notifications.
23:13:11 - INFO - Guard is using TerminalTitle to send notifications.
23:13:11 - DEBUG - Command execution: hash stty
23:13:11 - DEBUG - Guard starts all plugins
23:13:11 - DEBUG - Hook :start_begin executed for Guard::Shell
23:13:11 - DEBUG - Hook :start_end executed for Guard::Shell
23:13:11 - INFO - Guard is now watching at '/Users/ranmocy/test'
23:13:11 - DEBUG - Command execution: stty -g 2>/dev/null
23:13:11 - DEBUG - Start interactor
[1] guard(main)> 23:13:13 - DEBUG - Hook :stop_begin executed for Guard::Shell
23:13:13 - DEBUG - Hook :stop_end executed for Guard::Shell
23:13:13 - INFO - Using inline Guardfile.
23:13:13 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
23:13:13 - INFO - Guard is using TerminalNotifier to send notifications.
23:13:13 - INFO - Guard is using TerminalTitle to send notifications.
23:13:13 - INFO - Guardfile has been re-evaluated.

23:13:13 - DEBUG - Hook :start_begin executed for Guard::Shell
23:13:13 - DEBUG - Hook :start_end executed for Guard::Shell
23:13:13 - DEBUG - Stop interactor
23:13:13 - DEBUG - Command execution: stty 6902:3:4b00:200005cf:4:ff:ff:7f:17:15:12:0:3:1c:1a:19:11:13:16:f:1:0:14:0 2>/dev/null
23:13:13 - DEBUG - Command execution: stty -g 2>/dev/null
23:13:13 - DEBUG - Start interactor
23:13:15 - DEBUG - Stop interactor
23:13:15 - DEBUG - Command execution: stty 6902:3:4b00:200005cf:4:ff:ff:7f:17:15:12:0:3:1c:1a:19:11:13:16:f:1:0:14:0 2>/dev/null
23:13:15 - DEBUG - Command execution: stty -g 2>/dev/null
23:13:15 - DEBUG - Start interactor
23:13:17 - DEBUG - Stop interactor
23:13:17 - DEBUG - Command execution: stty 6902:3:4b00:200005cf:4:ff:ff:7f:17:15:12:0:3:1c:1a:19:11:13:16:f:1:0:14:0 2>/dev/null
23:13:17 - DEBUG - Command execution: stty -g 2>/dev/null
23:13:17 - DEBUG - Start interactor
[1] guard(main)>
23:13:20 - DEBUG - Command execution: stty 6902:3:4b00:200005cf:4:ff:ff:7f:17:15:12:0:3:1c:1a:19:11:13:16:f:1:0:14:0 2>/dev/null
23:13:20 - DEBUG - Guard stops all plugins
23:13:20 - DEBUG - Hook :stop_begin executed for Guard::Shell
23:13:20 - DEBUG - Hook :stop_end executed for Guard::Shell

23:13:20 - INFO - Bye bye...

Any help is appreciated.
Thanks.

Owner

thibaudgg commented Feb 28, 2014

Hi @ranmocy,

Can you please follow the contributing guideline and give your gems version. Thanks!

ranmocy commented Feb 28, 2014

@thibaudgg Sorry I forgot that parts. Updated. Thanks.

Owner

thibaudgg commented Feb 28, 2014

Same behaviour on a directory inside your user folder ~/test, there's maybe special right on /private/tmp

ranmocy commented Feb 28, 2014

Updated.
Seems almost the same.

Owner

thibaudgg commented Feb 28, 2014

@guard/core-team any ideas?

Owner

rymai commented Feb 28, 2014

This line looks suspicious to me: 23:13:13 - INFO - Using inline Guardfile.

Owner

thibaudgg commented Feb 28, 2014

@rymai I agree, I got the same feeling!

Owner

rymai commented Mar 6, 2014

This might be fixed by #568!

@rymai rymai self-assigned this Mar 6, 2014

@rymai rymai added fix and removed fix labels Mar 6, 2014

ranmocy commented Mar 7, 2014

It is fixed!
Thanks for all works!

@ranmocy ranmocy closed this Mar 7, 2014

Owner

thibaudgg commented Mar 7, 2014

@rymai 👍

rymai added a commit that referenced this issue Mar 7, 2014

Merge pull request #568 from guard/fix-540
Fix #540 & #566: Guardfile re-evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment