Skip to content

Commit dcc2cb5

Browse files
committed
open install.log in the log directory
1 parent 390c888 commit dcc2cb5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

autoload/OmniSharp.vim

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,12 @@ function! OmniSharp#Install(...) abort
431431
let l:location = shellescape(OmniSharp#util#ServerDir())
432432

433433
if has('win32')
434-
let l:logfile = s:plugin_root_dir . '\log\install.log'
434+
if exists('g:OmniSharp_vim_log_dir')
435+
let l:log_dir = g:OmniSharp_vim_log_dir
436+
else
437+
let l:log_dir = s:plugin_root_dir . '\log'
438+
end
439+
let l:logfile = l:log_dir . '\install.log'
435440
let l:script = shellescape(
436441
\ s:plugin_root_dir . '\installer\omnisharp-manager.ps1')
437442
let l:version_file_location = l:location . '\OmniSharpInstall-version.txt'
@@ -440,7 +445,12 @@ function! OmniSharp#Install(...) abort
440445
\ 'powershell -ExecutionPolicy Bypass -File %s %s -l %s %s',
441446
\ l:script, l:http, l:location, l:version)
442447
else
443-
let l:logfile = s:plugin_root_dir . '/log/install.log'
448+
if exists('g:OmniSharp_vim_log_dir')
449+
let l:log_dir = g:OmniSharp_vim_log_dir
450+
else
451+
let l:log_dir = s:plugin_root_dir . '/log'
452+
end
453+
let l:logfile = l:log_dir . '/install.log'
444454
let l:script = shellescape(
445455
\ s:plugin_root_dir . '/installer/omnisharp-manager.sh')
446456
let l:mono = g:OmniSharp_server_use_mono ? '-M' : ''

0 commit comments

Comments
 (0)