Skip to content

Commit

Permalink
Improve grep pattern in restorer.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Mar 9, 2018
1 parent 766b41d commit 5ef75c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/backup_restore/restorer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def extract_dump
def get_dumped_by_version
output = Discourse::Utils.execute_command(
File.extname(@dump_filename) == '.gz' ? 'zgrep' : 'grep',
'-m1', @dump_filename, '-e', "pg_dump",
'-m1', @dump_filename, '-e', "-- Dumped by pg_dump version",
failure_message: "Failed to check version of pg_dump used to generate the dump file"
)

Expand Down

0 comments on commit 5ef75c9

Please sign in to comment.