Skip to content

Commit

Permalink
Set default PowerShell Executable everywhere.
Browse files Browse the repository at this point in the history
Default to pwsh instead of nothing. This allows for performance
enhancements from -NoProfile.
  • Loading branch information
corbob committed Apr 25, 2019
1 parent f2e140e commit 5e826af
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions autoload/coc/powershell.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ function! coc#powershell#install(...)
if(exists('a:1.powershellExecutable'))
let s:powershell_executable = a:1.powershellExecutable
else
if(s:is_mac)
let s:powershell_executable = 'pwsh'
endif

let s:powershell_executable = 'pwsh'
if(s:is_win)
let s:powershell_executable = "powershell"
if(executable("pwsh"))
Expand All @@ -29,6 +26,6 @@ function! coc#powershell#install(...)
endif
let cwd = getcwd()
exe 'lcd '.s:root
exe '!'.s:powershell_executable.' '.s:install_script.' '.s:flags
exe '!'.s:powershell_executable.' -NoProfile -ExecutionPolicy Bypass'.s:install_script.' '.s:flags
exe 'lcd '.cwd
endfunction

0 comments on commit 5e826af

Please sign in to comment.