Sha256: 7ffc947b536f512d36919f1539a631320b833ce668e4a51f79c028005eb11f87

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

#!/usr/bin/env ruby

require "pathname"

default = Pathname(ENV.fetch("BUNDLE_GEMFILE", "Gemfile"))
relative_to_binstub = Pathname(__FILE__).realpath + "../../Gemfile"
gemfile = [default, relative_to_binstub].detect(&:exist?)

if gemfile && !ENV["RUBYGEMS_GEMDEPS"]
  ENV["BUNDLE_GEMFILE"] = gemfile.to_s
  require "rubygems"
  require "bundler/setup"
else
  require "rubygems"
end

def ignore_interrupts(*args)
  args.unshift(RbConfig.ruby) if Gem.win_platform?
  pid = spawn(*args)
  begin
    Process.wait(pid)
  rescue Interrupt
    retry
  end
  $? == 0
end

guard_core_path = Gem.bin_path("guard", "_guard-core")
while !ignore_interrupts(guard_core_path, *ARGV) && $?.exitstatus == 2
  puts("Restarting guard...")
end
exit($?.exitstatus)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guard-2.12.9 bin/guard
guard-2.12.8 bin/guard