aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-01 19:03:34 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-01 19:03:34 +0100
commit977609c66ed663a0cd5d8693171171f9744586fb (patch)
tree31890b47a914cc147c7698df9534406d512cf5b4
parent44c0c9d0dd53b9ffb05d43e4f67fda70c8d4736e (diff)
downloaddata-service-977609c66ed663a0cd5d8693171171f9744586fb.tar
data-service-977609c66ed663a0cd5d8693171171f9744586fb.tar.gz
Rewrite localhost for sqitch
As this means that like psql, the unix socket will be used.
-rw-r--r--scripts/guix-data-service.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in
index a0d64cf..e8b35b5 100644
--- a/scripts/guix-data-service.in
+++ b/scripts/guix-data-service.in
@@ -98,7 +98,11 @@
(string-append "db:pg://"
(%config 'database-user)
"@"
- (%config 'database-host)
+ (if (string=? (%config 'database-host)
+ "localhost")
+ "" ; This means the unix socket
+ ; connection will be used
+ (%config 'database-host))
"/"
(%config 'database-name)))))
(simple-format #t "running command: ~A\n"