* lisp/net/tramp.el (tramp-encoding-command-switch)
(tramp-encoding-command-interactive):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
`tramp-encoding-shell' could be nil. (Bug#23186)
(setenv "HISTSIZE" "0"))))
(setenv "PROMPT_COMMAND")
(setenv "PS1" tramp-initial-end-of-output)
+ (unless (stringp tramp-encoding-shell)
+ (tramp-error vec 'file-error "`tramp-encoding-shell' not set"))
(let* ((target-alist (tramp-compute-multi-hops vec))
;; We will apply `tramp-ssh-controlmaster-options'
;; only for the first hop.
:type '(file :must-match t))
(defcustom tramp-encoding-command-switch
- (if (string-match "cmd\\.exe" tramp-encoding-shell)
+ (if (string-match "cmd\\.exe" (or tramp-encoding-shell ""))
"/c"
"-c")
"Use this switch together with `tramp-encoding-shell' for local commands.
:type 'string)
(defcustom tramp-encoding-command-interactive
- (unless (string-match "cmd\\.exe" tramp-encoding-shell) "-i")
+ (unless (string-match "cmd\\.exe" (or tramp-encoding-shell "")) "-i")
"Use this switch together with `tramp-encoding-shell' for interactive shells.
See the variable `tramp-encoding-shell' for more information."
:version "24.1"