diff options
| author | Michael Albinus | 2016-08-26 15:12:42 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-08-26 15:12:42 +0200 |
| commit | 4a46232d92e7af257e1bccf2958e3362daa976dc (patch) | |
| tree | 6bee36659f1ed45702c2b4d146af8cf0949081ff | |
| parent | b39c0b31f0328da8b1a87226d5cfd7d46af62c0f (diff) | |
| download | emacs-4a46232d92e7af257e1bccf2958e3362daa976dc.tar.gz emacs-4a46232d92e7af257e1bccf2958e3362daa976dc.zip | |
* lisp/net/tramp-sh.el (tramp-get-remote-perl): Perform a basic check.
(Bug#22478)
| -rw-r--r-- | lisp/net/tramp-sh.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index bbc74fcad99..9afa85e8ceb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -5368,16 +5368,20 @@ Nonexistent directories are removed from spec." | |||
| 5368 | (tramp-message vec 5 "Finding a suitable `perl' command") | 5368 | (tramp-message vec 5 "Finding a suitable `perl' command") |
| 5369 | (let ((result | 5369 | (let ((result |
| 5370 | (or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec)) | 5370 | (or (tramp-find-executable vec "perl5" (tramp-get-remote-path vec)) |
| 5371 | (tramp-find-executable | 5371 | (tramp-find-executable vec "perl" (tramp-get-remote-path vec))))) |
| 5372 | vec "perl" (tramp-get-remote-path vec))))) | 5372 | ;; Perform a basic check. |
| 5373 | (and result | ||
| 5374 | (null (tramp-send-command-and-check | ||
| 5375 | vec (format "%s -e 'print \"Hello\n\";'" result))) | ||
| 5376 | (setq result nil)) | ||
| 5373 | ;; We must check also for some Perl modules. | 5377 | ;; We must check also for some Perl modules. |
| 5374 | (when result | 5378 | (when result |
| 5375 | (with-tramp-connection-property vec "perl-file-spec" | 5379 | (with-tramp-connection-property vec "perl-file-spec" |
| 5376 | (tramp-send-command-and-check | 5380 | (tramp-send-command-and-check |
| 5377 | vec (format "%s -e 'use File::Spec;'" result))) | 5381 | vec (format "%s -e 'use File::Spec;'" result))) |
| 5378 | (with-tramp-connection-property vec "perl-cwd-realpath" | 5382 | (with-tramp-connection-property vec "perl-cwd-realpath" |
| 5379 | (tramp-send-command-and-check | 5383 | (tramp-send-command-and-check |
| 5380 | vec (format "%s -e 'use Cwd \"realpath\";'" result)))) | 5384 | vec (format "%s -e 'use Cwd \"realpath\";'" result)))) |
| 5381 | result))) | 5385 | result))) |
| 5382 | 5386 | ||
| 5383 | (defun tramp-get-remote-stat (vec) | 5387 | (defun tramp-get-remote-stat (vec) |