Don't try to expand/glob parts of the command line that are

s-expressions
This commit is contained in:
eknauel 2005-08-10 18:29:04 +00:00
parent 1c20604f4f
commit 3b6c77f553
1 changed files with 7 additions and 5 deletions

View File

@ -55,18 +55,20 @@
=> lookup-env-var) => lookup-env-var)
(else str))) (else str)))
(define (expand-string str) (define (expand-string/s-expr v)
(substitute-env-vars str)) (if (string? v)
(substitute-env-vars v)
v))
(define (expand-redirection redirection) (define (expand-redirection redirection)
(make-redirection (make-redirection
(redirection-op redirection) (redirection-op redirection)
(expand-string (redirection-dest redirection)))) (expand-string/s-expr (redirection-dest redirection))))
(define (expand-command command) (define (expand-command command)
(let ((expanded (map expand-string (command-args command)))) (let ((expanded (map expand-string/s-expr (command-args command))))
(make-command (make-command
(expand-string (command-executable command)) (expand-string/s-expr (command-executable command))
(fold-right (fold-right
(lambda (arg args) (lambda (arg args)
(if (contains-glob-expression? arg) (if (contains-glob-expression? arg)