Skip to content

Commit

Permalink
Use isdefined on v0.6
Browse files Browse the repository at this point in the history
The Compat situation for `isdefined`/`@isdefined` is complicated; see JuliaLang/Compat.jl#402.
  • Loading branch information
jekbradbury authored Aug 9, 2018
1 parent 08d9dd0 commit 69a7b60
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ module DefaultDeps
if isfile("deps.jl")
include("deps.jl")
end
if !(@isdefined ROOTENV)
const ROOTENV = abspath(dirname(@__FILE__), "usr")
end
if !(@isdefined MINICONDA_VERSION)
const MINICONDA_VERSION = "3"
if isdefined(Base, Symbol("@isdefined"))
if !(@isdefined ROOTENV)
const ROOTENV = abspath(dirname(@__FILE__), "usr")
end
if !(@isdefined MINICONDA_VERSION)
const MINICONDA_VERSION = "3"
end
else
if !isdefined(:ROOTENV)
const ROOTENV = abspath(dirname(@__FILE__), "usr")
end
if !isdefined(:MINICONDA_VERSION)
const MINICONDA_VERSION = "3"
end
end
end

Expand All @@ -32,7 +41,7 @@ const ROOTENV = "$(escape_string(ROOTENV))"
const MINICONDA_VERSION = "$(escape_string(MINICONDA_VERSION))"
"""

if !isfile("deps.jl") || String(read("deps.jl")) != deps
if !isfile("deps.jl") || read("deps.jl", String) != deps
write("deps.jl", deps)
end

Expand Down

0 comments on commit 69a7b60

Please sign in to comment.