diff options
author | Enan Ajmain <3nan.ajmain@gmail.com> | 2021-11-09 20:22:21 +0600 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2022-06-25 07:20:58 -0700 |
commit | 0b9664f5240be4d9e9d6882fcd398970fd3a9532 (patch) | |
tree | e02103f3cfd37f6c313c096a41c0d660ea6ebaf2 /test/functional/helpers.lua | |
parent | b7084fef4c850d0352488b14dcff0f36a7e75e1c (diff) | |
download | rneovim-0b9664f5240be4d9e9d6882fcd398970fd3a9532.tar.gz rneovim-0b9664f5240be4d9e9d6882fcd398970fd3a9532.tar.bz2 rneovim-0b9664f5240be4d9e9d6882fcd398970fd3a9532.zip |
fix: make_filter_cmd for :! powershell #15913
Problem:
Nvim fails to create tempfile "…/nvim6UJx04/7" when 'shell' is set to
pwsh (PowerShell Core). This breaks filtered shell commands ":{range}!".
With shell set to cmd, it works.
Solution:
PowerShell doesn't use "<" for stdin redirection. Instead, use
"-RedirectStandardInput".
Closes #15913
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index d31d337b63..2018f80052 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -525,9 +525,9 @@ function module.set_shell_powershell() module.exec([[ let &shell = ']]..shell..[[' set shellquote= shellxquote= - let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' - let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ]]..cmd..[[' + let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' + let &shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait' ]]) end |