mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 21:46:35 +01:00
guix build: Validate that the file passed to ‘-m’ returns a manifest.
* guix/scripts/build.scm (options->things-to-build)[ensure-manifest]: New procedure. Use it. Change-Id: If64c483d7079f441a296d5bd4e06e67f44cbb7bf
This commit is contained in:
parent
5d6691d33e
commit
c6050cce28
1 changed files with 11 additions and 3 deletions
|
@ -629,6 +629,12 @@ (define (ensure-list x)
|
|||
(for-each validate-type lst)
|
||||
lst))
|
||||
|
||||
(define (ensure-manifest x file)
|
||||
(unless (manifest? x)
|
||||
(raise (formatted-message (G_ "file '~a' does not return a manifest")
|
||||
file)))
|
||||
x)
|
||||
|
||||
(define system
|
||||
(or (assoc-ref opts 'system) (%current-system)))
|
||||
|
||||
|
@ -701,9 +707,11 @@ (define (for-type obj)
|
|||
(loop tail 'regular
|
||||
(append (map manifest-entry-item
|
||||
(manifest-entries
|
||||
(ensure-manifest
|
||||
(load* manifest
|
||||
(make-user-module '((guix profiles)
|
||||
(gnu))))))
|
||||
(gnu))))
|
||||
manifest)))
|
||||
result)))
|
||||
(('expression . str)
|
||||
(loop tail 'regular
|
||||
|
|
Loading…
Reference in a new issue