exe/pgsync in pgsync-0.5.1 vs exe/pgsync in pgsync-0.5.2
- old
+ new
@@ -1,15 +1,11 @@
#!/usr/bin/env ruby
# disable Slop warning with Ruby 2.7
+# TODO remove when Slop > 4.7.0 is released
$VERBOSE = nil
+# handle interrupts
trap("SIGINT") { abort }
-begin
- require "pgsync"
- PgSync::Client.new(ARGV).perform
-rescue PgSync::Error => e
- abort PgSync::Client.colorize(e.message, 31) # red
-rescue Interrupt
- abort
-end
+require "pgsync"
+PgSync::Client.start