Last active
August 29, 2015 14:13
-
-
Save e2/b39b406d0f3309261558 to your computer and use it in GitHub Desktop.
Save this as bin/guard inside your projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pathname' | |
ENV['BUNDLE_GEMFILE'] ||= (Pathname(__FILE__).realpath + '../../Gemfile').to_s | |
require 'rubygems' | |
require 'bundler/setup' | |
while !system(Gem.bin_path('guard', 'guard')) && $?.exitstatus == 2 | |
puts('Restarting guard...') | |
end | |
exit($?.exitstatus) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment