diff options
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/database.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/guix-data-service/database.scm b/guix-data-service/database.scm index 0b5175a..8af53da 100644 --- a/guix-data-service/database.scm +++ b/guix-data-service/database.scm @@ -169,11 +169,12 @@ params))))) (simple-format #t "running command: ~A\n" (string-join command)) - (unless (zero? (apply system* command)) - (simple-format - (current-error-port) - "error: sqitch command failed\n") - (exit 1)))))))) + (let ((pid (spawn (%config 'sqitch) command))) + (unless (= 0 (status:exit-val (cdr (waitpid pid)))) + (simple-format + (current-error-port) + "error: sqitch command failed\n") + (primitive-exit 1))))))))) (define* (with-postgresql-connection name f #:key (statement-timeout #f)) (let ((conn (open-postgresql-connection name statement-timeout))) |