environment: Improve error reporting for '-l'.
This fixes two problems: 1. Load errors would print an ugly backtrace. 2. When FILE was an absolute name, 'load' was passed an incorrect file name. * guix/scripts/environment.scm (options/resolve-packages): Use 'load*' instead of 'load'.
This commit is contained in:
parent
417c39f132
commit
d70389c423
1 changed files with 1 additions and 1 deletions
|
@ -200,7 +200,7 @@ (define (options/resolve-packages opts)
|
||||||
(package-outputs package)))))
|
(package-outputs package)))))
|
||||||
(('load . file)
|
(('load . file)
|
||||||
;; Add all the outputs of the package defined in FILE.
|
;; Add all the outputs of the package defined in FILE.
|
||||||
(let ((package (load (string-append (getcwd) "/" file))))
|
(let ((package (load* file (make-user-module '()))))
|
||||||
(map (lambda (output)
|
(map (lambda (output)
|
||||||
`(package ,package ,output))
|
`(package ,package ,output))
|
||||||
(package-outputs package))))
|
(package-outputs package))))
|
||||||
|
|
Loading…
Reference in a new issue