mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-09 04:52:29 +08:00
Fix #1495 - Fall back to /bin/sh when shell=pwsh
This commit is contained in:
@@ -22,6 +22,23 @@ Execute(sh should be used when the shell is fish):
|
||||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar')
|
||||
endif
|
||||
|
||||
Execute(sh should be used when the shell is powershell):
|
||||
if !has('win32')
|
||||
" Set something else, so we will replace that too.
|
||||
let &shellcmdflag = '-f'
|
||||
let &shell = 'pwsh'
|
||||
|
||||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar')
|
||||
|
||||
let &shell = '/usr/bin/pwsh'
|
||||
|
||||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar')
|
||||
|
||||
let &shell = '/usr/local/bin/pwsh'
|
||||
|
||||
AssertEqual ['/bin/sh', '-c', 'foobar'], ale#job#PrepareCommand(bufnr(''), 'foobar')
|
||||
endif
|
||||
|
||||
Execute(Other shells should be used when set):
|
||||
if !has('win32')
|
||||
let &shell = '/bin/bash'
|
||||
|
||||
Reference in New Issue
Block a user