Don't try to expand/glob parts of the command line that are
s-expressions
This commit is contained in:
parent
1c20604f4f
commit
3b6c77f553
|
@ -55,18 +55,20 @@
|
|||
=> lookup-env-var)
|
||||
(else str)))
|
||||
|
||||
(define (expand-string str)
|
||||
(substitute-env-vars str))
|
||||
(define (expand-string/s-expr v)
|
||||
(if (string? v)
|
||||
(substitute-env-vars v)
|
||||
v))
|
||||
|
||||
(define (expand-redirection redirection)
|
||||
(make-redirection
|
||||
(redirection-op redirection)
|
||||
(expand-string (redirection-dest redirection))))
|
||||
(expand-string/s-expr (redirection-dest redirection))))
|
||||
|
||||
(define (expand-command command)
|
||||
(let ((expanded (map expand-string (command-args command))))
|
||||
(let ((expanded (map expand-string/s-expr (command-args command))))
|
||||
(make-command
|
||||
(expand-string (command-executable command))
|
||||
(expand-string/s-expr (command-executable command))
|
||||
(fold-right
|
||||
(lambda (arg args)
|
||||
(if (contains-glob-expression? arg)
|
||||
|
|
Loading…
Reference in New Issue