diff options
| author | Dominique Quatravaux | 2016-12-15 09:37:00 +0100 |
|---|---|---|
| committer | Michael Albinus | 2016-12-15 09:37:00 +0100 |
| commit | d381db25a201fa67b7e274a758d6a7c2c350067e (patch) | |
| tree | 8436d0f181426a669d8328a24042204711fbfe3d | |
| parent | 0a5898c3dd2e32431268bc2bcf3536d4cd62ad39 (diff) | |
| download | emacs-d381db25a201fa67b7e274a758d6a7c2c350067e.tar.gz emacs-d381db25a201fa67b7e274a758d6a7c2c350067e.zip | |
Protect environment variables with double quotes in Tramp
* lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Protect environment variables with double quotes.
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/net/tramp-sh.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 419dccb47e0..31ef2efbf20 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -4201,10 +4201,11 @@ process to set up. VEC specifies the connection." | |||
| 4201 | (when vars | 4201 | (when vars |
| 4202 | (tramp-send-command | 4202 | (tramp-send-command |
| 4203 | vec | 4203 | vec |
| 4204 | (format "while read var val; do export $var=$val; done <<'%s'\n%s\n%s" | 4204 | (format |
| 4205 | tramp-end-of-heredoc | 4205 | "while read var val; do export $var=\"$val\"; done <<'%s'\n%s\n%s" |
| 4206 | (mapconcat 'identity vars "\n") | 4206 | tramp-end-of-heredoc |
| 4207 | tramp-end-of-heredoc) | 4207 | (mapconcat 'identity vars "\n") |
| 4208 | tramp-end-of-heredoc) | ||
| 4208 | t)) | 4209 | t)) |
| 4209 | (when unset | 4210 | (when unset |
| 4210 | (tramp-send-command | 4211 | (tramp-send-command |