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'.
master
Ludovic Courtès 2015-06-30 23:31:24 +02:00
parent 417c39f132
commit d70389c423
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ packages."
(package-outputs package)))))
(('load . 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)
`(package ,package ,output))
(package-outputs package))))