Skip to content

Commit f02b6cd

Browse files
committed
Travis patch
1 parent 91ee886 commit f02b6cd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/services/Serialization.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ JSON.show_json(io::JSONContext, serialization::CommonSerialization, uuid::UUID)
1111

1212
## Version checking
1313
function _getDFGVersion()
14-
Pkg.status()
15-
# Looks like this is deprecated but there's no replacement function yet.
16-
return string(Pkg.dependencies()[Base.UUID("b5cc3c7e-6572-11e9-2517-99fb8daf2f04")].version)
14+
if haskey(Pkg.dependencies(), Base.UUID("b5cc3c7e-6572-11e9-2517-99fb8daf2f04"))
15+
return string(Pkg.dependencies()[Base.UUID("b5cc3c7e-6572-11e9-2517-99fb8daf2f04")].version)
16+
else
17+
# This is arguably slower, but needed for Travis.
18+
return Pkg.TOML.parse(read(joinpath(dirname(pathof(@__MODULE__)), "..", "Project.toml"), String))["version"]
19+
end
1720
end
1821

1922
function _versionCheck(props::Dict{String, Any})

0 commit comments

Comments
 (0)