Use uiop:run-program ... :directory ... (#473)

This commit is contained in:
Elias Pipping 2016-11-06 22:40:12 +01:00 committed by Dimitri Fontaine
parent 0bd4488d78
commit af46dc280f

View File

@ -45,11 +45,11 @@
"Return the current abbreviated git hash of the development tree." "Return the current abbreviated git hash of the development tree."
(handler-case (handler-case
(let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h"))) (let ((git-hash `("git" "--no-pager" "log" "-n1" "--format=format:%h")))
(uiop:with-current-directory ((asdf:system-source-directory :pgloader))
(multiple-value-bind (stdout stderr code) (multiple-value-bind (stdout stderr code)
(uiop:run-program git-hash :output :string) (uiop:run-program git-hash :output :string
:directory (asdf:system-source-directory :pgloader))
(declare (ignore code stderr)) (declare (ignore code stderr))
stdout))) stdout))
(condition (e) (condition (e)
;; in case anything happen, just return X.Y.Z~devel ;; in case anything happen, just return X.Y.Z~devel
(declare (ignore e)) (declare (ignore e))