build: go-build-system: Use WHEN for side-effect conditionals.

* guix/build/go-build-system.scm (unpack): Replace single branch `if' by
`when'.
This commit is contained in:
Maxim Cournoyer 2019-04-04 23:26:04 -04:00
parent b5f0528354
commit 7e84d3eef7
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -158,6 +158,10 @@ (define* (unpack #:key source import-path unpack-path #:allow-other-keys)
((display "WARNING: The Go import path is unset.\n"))) ((display "WARNING: The Go import path is unset.\n")))
(if (string-null? unpack-path) (if (string-null? unpack-path)
(set! unpack-path import-path)) (set! unpack-path import-path))
(when (string-null? import-path)
((display "WARNING: The Go import path is unset.\n")))
(when (string-null? unpack-path)
(set! unpack-path import-path))
(let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path))) (let ((dest (string-append (getenv "GOPATH") "/src/" unpack-path)))
(mkdir-p dest) (mkdir-p dest)
(if (file-is-directory? source) (if (file-is-directory? source)