aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-09-16 19:39:04 +0100
committerChristopher Baines <mail@cbaines.net>2020-09-16 19:39:04 +0100
commit2dc6adbbbd6cec095d8606973c81d62d5930b87a (patch)
tree7ac98c364e1a6313dd0d77db1d55568c20c5c96b
parent745de370c1e1fcad224da9354e59d9b19c687847 (diff)
downloadbuild-coordinator-2dc6adbbbd6cec095d8606973c81d62d5930b87a.tar
build-coordinator-2dc6adbbbd6cec095d8606973c81d62d5930b87a.tar.gz
Fix the sqitch --chdir argument for installations
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index c598b43..6de0187 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -1737,7 +1737,14 @@ WHERE build_results.build_id = :build_id")))
(list (%config 'sqitch)
"deploy"
"--db-client" (%config 'sqitch-sqlite)
- "--chdir" (dirname (dirname (%config 'sqitch-plan)))
+ ;; if sqitch.conf exists (which it should when developing),
+ ;; just use the current directory as the chdir value. Otherwise
+ ;; use the directory which should contain the right files after
+ ;; installation.
+ "--chdir" (if (file-exists? "sqitch.conf")
+ (getcwd)
+ (string-append (dirname (%config 'sqitch-plan))
+ "/sqlite"))
"--plan-file" (%config 'sqitch-plan)
(string-append "db:sqlite:" database-file))))