blob: 657e5e88dc30fb187576802be155553355cf0688 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
Before:
runtime autoload/ale/powershell.vim
let g:ale_powershell_powershell_executable = 'pwsh'
After:
if exists('g:tempname')
call delete(g:tempname, 'rf')
endif
unlet! g:command
unlet! g:tempname
unlet! g:tempscript
unlet! g:ale_powershell_powershell_executable
runtime autoload/ale/util.vim
Execute(RunPowerShell should normalize mixed Windows temporary paths):
if has('win32')
let g:tempname = substitute(ale#util#Tempname(), '\\', '/', 'g')
function! ale#util#Tempname() abort
return g:tempname
endfunction
let g:tempscript = ale#path#GetAbsPath(g:tempname, 'script.ps1')
let g:command = ale#powershell#RunPowerShell(
\ bufnr(''),
\ 'powershell_powershell',
\ ['Write-Output ''ok'''],
\)
AssertEqual
\ ale#Escape('pwsh')
\ . ' -Exe Bypass -NoProfile -File '
\ . ale#Escape(g:tempscript)
\ . ' %t',
\ g:command
endif
|