mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
store: 'register-path' no longer swallows 'system-error' exceptions.
* guix/store.scm (register-path): Do not catch 'system-error'.
This commit is contained in:
parent
e0b47290a7
commit
95fa173ed1
1 changed files with 13 additions and 18 deletions
|
@ -1061,24 +1061,19 @@ (define* (register-path path
|
||||||
Use with care as it directly modifies the store! This is primarily meant to
|
Use with care as it directly modifies the store! This is primarily meant to
|
||||||
be used internally by the daemon's build hook."
|
be used internally by the daemon's build hook."
|
||||||
;; Currently this is implemented by calling out to the fine C++ blob.
|
;; Currently this is implemented by calling out to the fine C++ blob.
|
||||||
(catch 'system-error
|
(let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
|
||||||
(lambda ()
|
`(,@(if prefix
|
||||||
(let ((pipe (apply open-pipe* OPEN_WRITE %guix-register-program
|
`("--prefix" ,prefix)
|
||||||
`(,@(if prefix
|
'())
|
||||||
`("--prefix" ,prefix)
|
,@(if state-directory
|
||||||
'())
|
`("--state-directory" ,state-directory)
|
||||||
,@(if state-directory
|
'())))))
|
||||||
`("--state-directory" ,state-directory)
|
(and pipe
|
||||||
'())))))
|
(begin
|
||||||
(and pipe
|
(format pipe "~a~%~a~%~a~%"
|
||||||
(begin
|
path (or deriver "") (length references))
|
||||||
(format pipe "~a~%~a~%~a~%"
|
(for-each (cut format pipe "~a~%" <>) references)
|
||||||
path (or deriver "") (length references))
|
(zero? (close-pipe pipe))))))
|
||||||
(for-each (cut format pipe "~a~%" <>) references)
|
|
||||||
(zero? (close-pipe pipe))))))
|
|
||||||
(lambda args
|
|
||||||
;; Failed to run %GUIX-REGISTER-PROGRAM.
|
|
||||||
#f)))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Reference in a new issue