mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
build-aux: Turn `with-input-pipe-to-string' into a procedure.
There is no reason this should be syntax. * build-aux/update-guix-package.scm (with-input-pipe-to-string): Make it a procedure. Change-Id: I96daeb40eb9202c542a7906926f2e25765d5078f
This commit is contained in:
@@ -128,13 +128,13 @@ COMMIT. PROC receives the temporary directory file name as an argument."
|
||||
(define %guix-git-repo-push-url-regexp
|
||||
"(git.guix.gnu.org|codeberg.org/guix|git@codeberg.org:guix)/guix(.git)? \\(push\\)")
|
||||
|
||||
(define-syntax-rule (with-input-pipe-to-string prog arg ...)
|
||||
(let* ((input-pipe (open-pipe* OPEN_READ prog arg ...))
|
||||
(define (with-input-pipe-to-string prog . args)
|
||||
(let* ((input-pipe (apply open-pipe* OPEN_READ prog args))
|
||||
(output (get-string-all input-pipe))
|
||||
(exit-val (status:exit-val (close-pipe input-pipe))))
|
||||
(unless (zero? exit-val)
|
||||
(error (format #f "Command ~s exited with non-zero exit status: ~s"
|
||||
(string-join (list prog arg ...)) exit-val)))
|
||||
(string-join (cons prog args)) exit-val)))
|
||||
(string-trim-both output)))
|
||||
|
||||
(define (find-origin-remote)
|
||||
|
||||
Reference in New Issue
Block a user