From: Tom Clegg Date: Fri, 24 Mar 2017 18:37:22 +0000 (-0400) Subject: Remove -i flag from Rails3 pg_dump invocation. X-Git-Tag: 1.1.0~356 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/d31988b6da2d779a8f3ba4ba3c40760f9729c59f Remove -i flag from Rails3 pg_dump invocation. No issue # --- diff --git a/services/api/Rakefile b/services/api/Rakefile index fbbf53e3c6..6df88c308c 100644 --- a/services/api/Rakefile +++ b/services/api/Rakefile @@ -63,3 +63,14 @@ namespace :db do end end end + +# Work around Rails3+PostgreSQL9.5 incompatibility (pg_dump used to +# accept -i as a no-op, but now it's not accepted at all). +module Kernel + alias_method :orig_backtick, :` + def `(*args) #`#` sorry, parsers + args[0].sub!(/\Apg_dump -i /, 'pg_dump ') rescue nil + STDERR.puts "`#{args.inspect}`" + orig_backtick(*args) + end +end