Handle better changed default-directory in shell-command
* lisp/simple.el (shell-command): Kill buffer-local values of `shell-file-name' and `shell-command-switch', there could be left connection-local values. (Bug#76888)
This commit is contained in:
parent
f22af15aef
commit
37b8acf378
1 changed files with 3 additions and 0 deletions
|
@ -4715,6 +4715,9 @@ impose the use of a shell (with its need to quote arguments)."
|
|||
(with-current-buffer buffer
|
||||
(shell-command-save-pos-or-erase)
|
||||
(setq default-directory directory)
|
||||
;; There could be left connection-local values. (Bug#76888)
|
||||
(kill-local-variable 'shell-file-name)
|
||||
(kill-local-variable 'shell-command-switch)
|
||||
(require 'shell)
|
||||
(let ((process-environment
|
||||
(append
|
||||
|
|
Loading…
Add table
Reference in a new issue