lib/dispatch-rider/command.rb in dispatch-rider-2.1.0 vs lib/dispatch-rider/command.rb in dispatch-rider-2.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'daemons' require 'pathname' require 'optparse' module DispatchRider @@ -21,12 +23,10 @@ process_args(args) process_name = "dispatch_rider.#{@options[:identifier]}" Daemons.run_proc(process_name, @options) do $0 = File.join(@options[:prefix], process_name) if @options[:prefix] - Dir.chdir(@app_home.to_s) do - block.call - end + Dir.chdir(@app_home.to_s, &block) end end private