Skip to content

Commit

Permalink
If compilation fails, check Rtools version
Browse files Browse the repository at this point in the history
  • Loading branch information
jalvesaq committed Aug 6, 2016
1 parent 9360601 commit 8c33d16
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions R/common_global.vim
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,19 @@ function ShowRSysLog(slog, fname, msg)
sleep 1
endfunction

function CheckRtools()
let Rtpath = substitute($PATH, '.*;\(.*Rtools\)\\.*', '\1', '')
if Rtpath =~ "Rtools"
let Rtpath = substitute(Rtpath, "\\", "/", "g") . "/VERSION.txt"
if filereadable(Rtpath)
let Rtvrsn = readfile(Rtpath)
if Rtvrsn[0] =~ "version 3.4"
call RWarningMsg("Nvim-R is incompatible with Rtools 3.4 (August 2016). Please, try Rtools 3.3.")
endif
endif
endif
endfunction

function CheckNvimcomVersion()
let neednew = 0
if g:rplugin_nvimcom_home == ""
Expand Down Expand Up @@ -713,6 +726,9 @@ function CheckNvimcomVersion()
let slog = system(g:rplugin_Rcmd . " CMD INSTALL nvimcom_" . s:required_nvimcom . ".tar.gz")
if v:shell_error
call ShowRSysLog(slog, "Error_installing_nvimcom", "Failed to install nvimcom")
if has("win32")
call CheckRtools()
endif
return 0
else
echon "OK!"
Expand Down
4 changes: 2 additions & 2 deletions R/nvimcom/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: nvimcom
Version: 0.9-19
Date: 2016-03-10
Version: 0.9-21
Date: 2016-08-06
Title: Intermediate the communication between R and either Neovim or Vim
Author: Jakson Aquino
Maintainer: Jakson Alves de Aquino <[email protected]>
Expand Down

0 comments on commit 8c33d16

Please sign in to comment.