summaryrefslogtreecommitdiff
path: root/guix/scripts/package.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-09-18 14:55:44 +0200
committerLudovic Courtès <ludo@gnu.org>2019-09-18 23:08:28 +0200
commitf9c0400392843540a87985a67ffb9fb6e4dbc2fa (patch)
tree66e294cc022f4383d2f64b7dbfc9ccd567082ef4 /guix/scripts/package.scm
parentcf48ea9539020bd6300033a8910ca951225582e6 (diff)
guix package: "guix package -f FILE" ensures FILE returns a package.
* guix/scripts/package.scm (options->installable): Add clause for 'install option with a non-package object. * tests/guix-package.sh: Add test.
Diffstat (limited to 'guix/scripts/package.scm')
-rw-r--r--guix/scripts/package.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index a43c96516f..21737f43da 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -607,7 +607,11 @@ and upgrades."
(let-values (((package output)
(specification->package+output spec)))
(package->manifest-entry* package output))))
- (_ #f))
+ (('install . obj)
+ (leave (G_ "cannot install non-package object: ~s~%")
+ obj))
+ (_
+ #f))
opts))
(fold manifest-transaction-install-entry