diff options
author | Christopher Baines <mail@cbaines.net> | 2021-07-11 12:40:48 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-07-11 12:40:48 +0100 |
commit | d1a2a7125cc15d6d1d8d41e2e8394493e963e5fa (patch) | |
tree | a4c912b9c4f65a35fddb94b3ac22dbfec0c87130 /scripts | |
parent | af209170f7b3ea3e1d6539573cc5fc0255239ec5 (diff) | |
download | data-service-d1a2a7125cc15d6d1d8d41e2e8394493e963e5fa.tar data-service-d1a2a7125cc15d6d1d8d41e2e8394493e963e5fa.tar.gz |
Fix a regression with running sqitch
Introduced in 0dc05982cde052c985bb440dc026cbe3334ee50b.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-data-service.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/guix-data-service.in b/scripts/guix-data-service.in index 33cf2b5..7eae735 100644 --- a/scripts/guix-data-service.in +++ b/scripts/guix-data-service.in @@ -141,7 +141,13 @@ (list (%config 'sqitch) "deploy" "--db-client" (%config 'sqitch-psql) - "--chdir" (dirname (dirname (%config 'sqitch-plan))) + ;; For some reason, sqitch behaves differently when the + ;; guix-data-service is packaged, and when it's not, so try + ;; and hack around this here. + "--chdir" (let ((base (dirname (%config 'sqitch-plan)))) + (if (string-prefix? "/gnu" (%config 'sqitch-plan)) + base + (dirname base))) "--plan-file" (%config 'sqitch-plan) "--mode" "change" ; this helps when migrations don't ; have the revert bit implemented |