diff options
author | T727 <74924917+T-727@users.noreply.github.com> | 2023-04-22 13:04:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-22 12:04:05 +0200 |
commit | d9f78b63361e00a7f623ebb5b869606ac653b180 (patch) | |
tree | 35760a843eb7eae6ecfa4d8124bbee53c242c1e4 /test/functional/helpers.lua | |
parent | e9b85acfbb8d3b1dd6f92deb187800be757c6c68 (diff) | |
download | rneovim-d9f78b63361e00a7f623ebb5b869606ac653b180.tar.gz rneovim-d9f78b63361e00a7f623ebb5b869606ac653b180.tar.bz2 rneovim-d9f78b63361e00a7f623ebb5b869606ac653b180.zip |
docs(powershell): use tee.exe instead of Tee-Object
Problem: Tee-Object does not create a file if it does not receive input
for example when :grep does not find matches.
and so nvim tries to open a nonexistent errorfile causing an error.
Solution: use tee.exe instead of Tee-Object
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 2e373467d0..6e668b22b0 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -552,7 +552,7 @@ function module.set_shell_powershell(fake) end local shell = found and (is_os('win') and 'powershell' or 'pwsh') or module.testprg('pwsh-test') local cmd = 'Remove-Item -Force '..table.concat(is_os('win') - and {'alias:cat', 'alias:echo', 'alias:sleep', 'alias:sort'} + and {'alias:cat', 'alias:echo', 'alias:sleep', 'alias:sort', 'alias:tee'} or {'alias:echo'}, ',')..';' module.exec([[ let &shell = ']]..shell..[[' @@ -562,7 +562,7 @@ function module.set_shell_powershell(fake) let &shellcmdflag .= '$PSDefaultParameterValues[''Out-File:Encoding'']=''utf8'';' let &shellcmdflag .= ']]..cmd..[[' let &shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' - let &shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' + let &shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' ]]) return found end |