netzpirat / guard-cucumber

Guard::Cucumber automatically runs your features (much like autotest)
https://rubygems.org/gems/guard-cucumber
MIT License
39 stars 56 forks source link

rerun.txt #20

Closed crystalin closed 12 years ago

crystalin commented 12 years ago

Hi. I'm sharing folders between windows and linux and when using guard-cucumber I get this error:

ERROR: Guard::Cucumber failed to achieve its , exception was: Errno::ETXTBSY: Text file busy - rerun.txt .../guard-cucumber-0.7.2/lib/guard/cucumber.rb:114:in delete .../guard-cucumber-0.7.2/lib/guard/cucumber.rb:114:in read_failed_features .../guard-cucumber-0.7.2/lib/guard/cucumber.rb:60:in run_all ...

Guard::Cucumber has just been fired (running a rm rerun.txt is working fine)

It can be avoided using :keep_failed => false, but I'd be cool if we can fix it.

netzpirat commented 12 years ago

I think the issue was that the file was not properly closed. I switched to a block for reading rerun.txt, so that the file automatically gets properly closed when the block is exited.

This fix is in released in 0.7.3.

crystalin commented 12 years ago

It is working with the 0.7.3, thanks

netzpirat commented 12 years ago

Glad to hear! Thanks for the feedback.