evaluate: Use 'read' instead of 'eval-string'.

pull/3/head
Mathieu Lirzin 2016-07-23 21:55:41 +02:00
parent fba9b37dc9
commit 219a8d5b40
No known key found for this signature in database
GPG Key ID: 0ADEE10094604D37
2 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ if required."
(assq-ref spec #:name) "/"
(assq-ref spec #:load-path))
(%package-cachedir)
(string-append "'" (object->string spec))))
(object->string spec)))
(jobs (read port)))
(close-pipe port)
;; Keep track of SPEC id in the returned jobs.

View File

@ -60,10 +60,10 @@ value."
(match args
((command load-path cachedir specstr)
;; Load FILE, a Scheme file that defines Hydra jobs.
(let* ((%user-module (make-fresh-user-module))
(spec (eval-string specstr %user-module))
(stdout (current-output-port))
(stderr (current-error-port)))
(let ((%user-module (make-fresh-user-module))
(spec (with-input-from-string specstr read))
(stdout (current-output-port))
(stderr (current-error-port)))
(save-module-excursion
(λ ()
(set-current-module %user-module)