Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guardfile only be re-evaluated once #566

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

Guardfile only be re-evaluated once #566

ranmocy opened this issue Feb 28, 2014 · 10 comments
Assignees

Comments

@ranmocy
Copy link

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.

@thibaudgg
Copy link
Member

Hi @ranmocy,

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

@ranmocy
Copy link
Author

ranmocy commented Feb 28, 2014

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

@thibaudgg
Copy link
Member

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

@ranmocy
Copy link
Author

ranmocy commented Feb 28, 2014

Updated.
Seems almost the same.

@thibaudgg
Copy link
Member

@guard/core-team any ideas?

@rymai
Copy link
Member

rymai commented Feb 28, 2014

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

@thibaudgg
Copy link
Member

@rymai I agree, I got the same feeling!

@rymai
Copy link
Member

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
Copy link
Author

ranmocy commented Mar 7, 2014

It is fixed!
Thanks for all works!

@ranmocy ranmocy closed this as completed Mar 7, 2014
@thibaudgg
Copy link
Member

@rymai 👍

rymai added a commit that referenced this issue Mar 7, 2014
Fix #540 & #566: Guardfile re-evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants