exit code checking added
This commit is contained in:
@@ -49,10 +49,12 @@
|
||||
args)
|
||||
|
||||
|
||||
(define (std-process-git-result cmd result output out)
|
||||
(define (std-process-git-result cmd exit-code result output out)
|
||||
(git-displ out)
|
||||
(if result
|
||||
result
|
||||
(if (= exit-code 0)
|
||||
#t
|
||||
#f)
|
||||
(git-error cmd "Error" out)))
|
||||
|
||||
(define-syntax def-git-cmd-proxy
|
||||
@@ -64,9 +66,9 @@
|
||||
((_ f cmd pre-code process-result)
|
||||
(define (f args)
|
||||
(let ((nargs (pre-code args)))
|
||||
(let ((output (run-git (cons cmd nargs))))
|
||||
(let-values (((exit-code output) (run-git (cons cmd nargs))))
|
||||
(let-values (((result out) (git-out cmd output)))
|
||||
(process-result cmd result output out))))))
|
||||
(process-result cmd exit-code result output out))))))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user