Skip to content

Commit

Permalink
Define HOME on windows, fixes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Sep 9, 2015
1 parent 40d6b42 commit 95cd4b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ if OS_NAME == :Windows
Rlib = joinpath(Rlibpath,Rlibname)
Libdl.dlopen_e(Rlib) == C_NULL && error("Unable to locate $Rlibname\nTry adding location to PATH and re-run Pkg.build(\"RCall\")")

# We have to circumvent Win32/POSIX ENV bug, see
# use _wputenv to circumvent Win32/POSIX ENV bug, see
# https://github.com/JuliaLang/julia/issues/11215
# define HOME to stop R defining it
deps_code = quote
const libR = $Rlib
ccall(:_wputenv,Cint,(Ptr{UInt16},),utf16("PATH="*ENV["PATH"]*";"*$Rlibpath))
ccall(:_wputenv,Cint,(Ptr{UInt16},),utf16("HOME="*homedir()))
end
end
else
Expand Down

0 comments on commit 95cd4b5

Please sign in to comment.