Skip to content

Commit 14694ef

Browse files
committed
Fixed CI
1 parent 1f44e64 commit 14694ef

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/pgsync/data_source.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ def exists?
1414
@url && @url.size > 0
1515
end
1616

17-
# host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
1817
def local?
19-
!host || %w(localhost 127.0.0.1).include?(host) || host.split(",").all? { |v| v.start_with?("/") }
18+
socket? || %w(localhost 127.0.0.1).include?(host)
19+
end
20+
21+
# host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
22+
def socket?
23+
!host || host.split(",").all? { |v| v.start_with?("/") }
2024
end
2125

2226
def host

lib/pgsync/sync.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def search_tree(file)
124124
end
125125

126126
def print_description(prefix, source)
127-
location = " on #{source.host}:#{source.port}" if source.host
127+
location = " on #{source.host}:#{source.port}" if !source.socket?
128128
log "#{prefix}: #{source.dbname}#{location}"
129129
end
130130

0 commit comments

Comments
 (0)