Browse Source

defuck environment variables mess

pull/1/head
Wesley Kerfoot 7 years ago
parent
commit
17ceee9579
  1. 10
      bolt.rkt
  2. 2
      shell_env.rkt

10
bolt.rkt

@ -56,7 +56,7 @@
(define (as-user cmd) (define (as-user cmd)
(if (if
(user) (user)
(format "sudo -u ~a sh -c \"~a\"" (format "sudo -u ~a sh -c '~a'"
(user) (user)
cmd) cmd)
cmd)) cmd))
@ -67,11 +67,11 @@
(match (match
(ssh (host) (ssh (host)
(as-user (as-user
(string-append (format "cd ~a && ~a ~a"
(format "cd ~a && ~a; "
(cwd) (cwd)
(format-vars)) (format-vars)
cmd)) cmd)
)
#:failure-log "/tmp/test.log" #:failure-log "/tmp/test.log"
#:mode 'output) #:mode 'output)
[(cons code output) [(cons code output)

2
shell_env.rkt

@ -40,7 +40,7 @@
(hash-map (hash-map
(shell-env) (shell-env)
(lambda (k v) (lambda (k v)
(format "~a=~a" k v))))) (format "export ~a=~a;" k v)))))
(define-syntax join-shell-vars (define-syntax join-shell-vars
(syntax-rules () (syntax-rules ()

Loading…
Cancel
Save