From 17ceee9579c63133e8c15380158275c0b2d92429 Mon Sep 17 00:00:00 2001 From: Wesley Kerfoot Date: Sun, 29 Apr 2018 03:40:13 -0400 Subject: [PATCH] defuck environment variables mess --- bolt.rkt | 10 +++++----- shell_env.rkt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bolt.rkt b/bolt.rkt index 39fff3b..6cda9a6 100755 --- a/bolt.rkt +++ b/bolt.rkt @@ -56,7 +56,7 @@ (define (as-user cmd) (if (user) - (format "sudo -u ~a sh -c \"~a\"" + (format "sudo -u ~a sh -c '~a'" (user) cmd) cmd)) @@ -67,11 +67,11 @@ (match (ssh (host) (as-user - (string-append - (format "cd ~a && ~a; " + (format "cd ~a && ~a ~a" (cwd) - (format-vars)) - cmd)) + (format-vars) + cmd) + ) #:failure-log "/tmp/test.log" #:mode 'output) [(cons code output) diff --git a/shell_env.rkt b/shell_env.rkt index 9f3dc40..23d53f7 100644 --- a/shell_env.rkt +++ b/shell_env.rkt @@ -40,7 +40,7 @@ (hash-map (shell-env) (lambda (k v) - (format "~a=~a" k v))))) + (format "export ~a=~a;" k v))))) (define-syntax join-shell-vars (syntax-rules ()