projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
16552: Fix cwd warning from psql.
[arvados.git]
/
lib
/
install
/
init.go
diff --git
a/lib/install/init.go
b/lib/install/init.go
index b7ca0701fb08d9a55b2dba3abe66ab8db9f9e8e4..73483d3b3b6cbe015a322cb4619a88d64dff5a6b 100644
(file)
--- a/
lib/install/init.go
+++ b/
lib/install/init.go
@@
-339,6
+339,7
@@
func (initcmd *initCommand) createDB(ctx context.Context, dbconn arvados.Postgre
`CREATE EXTENSION IF NOT EXISTS pg_trgm`,
} {
cmd := exec.CommandContext(ctx, "sudo", "-u", "postgres", "psql", "-c", sql)
+ cmd.Dir = "/"
cmd.Stdout = stderr
cmd.Stderr = stderr
err := cmd.Run()