exit code checking added
This commit is contained in:
@@ -72,9 +72,7 @@
|
||||
(set! cached-git-exe exe-path))))
|
||||
|
||||
|
||||
(define/contract (run-git args)
|
||||
(-> (listof (or/c path-string? symbol?))
|
||||
(listof (list/c (one-of/c 'stdout 'stderr) string?)))
|
||||
(define (run-git args)
|
||||
(putenv "GIT_TERMINAL_PROMPT" "0")
|
||||
(let-values (((process stdout stdin stderr)
|
||||
(apply subprocess
|
||||
@@ -107,7 +105,8 @@
|
||||
(if (= open-ports 0)
|
||||
(begin
|
||||
(subprocess-wait process)
|
||||
(reverse result))
|
||||
(values (subprocess-status process)
|
||||
(reverse result)))
|
||||
(let* ((output (channel-get output-channel))
|
||||
(line (cadr output)))
|
||||
(if (eof-object? line)
|
||||
@@ -146,7 +145,7 @@
|
||||
(format "~a" e)))
|
||||
(format "~a" e)))
|
||||
(if (list? outp) outp (list outp))))
|
||||
(enter (if (eq? (system-type 'os) 'windows) "\r\n" "\n"))
|
||||
(enter (if (eq? (system-type 'os) 'windows) "\n" "\n"))
|
||||
(msg (format "git ~a: ~a: ~a" cmd msg* (string-join out enter)))
|
||||
)
|
||||
(err-git msg)
|
||||
|
||||
Reference in New Issue
Block a user