Skip to content
Snippets Groups Projects
Commit d70389c4 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

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'.
parent 417c39f1
No related branches found
No related tags found
No related merge requests found
......@@ -200,7 +200,7 @@ (define (options/resolve-packages opts)
(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))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment