@@ -111,20 +111,24 @@ function get_stdlibs(scratch_dir, julia_installer_name)
111111 end
112112
113113 # This will give us a dictionary of UUID => (name, version) mappings for all standard libraries
114- stdlibs = Dict {Base.UUID, Tuple} (uuid => (name, nothing ) for (uuid, name) in eval (Meta. parse (stdlibs_str)))
114+ if jlvers < v " 1.8"
115+ stdlibs = Dict {Base.UUID, Tuple} (uuid => (name, nothing ) for (uuid, name) in eval (Meta. parse (stdlibs_str)))
115116
116- # We're going to try and get versions for each stdlib:
117- stdlib_path = readchomp (` $(jlexe) $(jlflags) -e 'import Pkg; print(Pkg.Types.stdlib_path(""))'` )
118- for uuid in keys (stdlibs)
119- # If this stdlib has a `Project.toml`, try to parse it for its version field
120- name = first (stdlibs[uuid])
121- project_path = joinpath (stdlib_path, name, " Project.toml" )
122- if isfile (project_path)
123- d = TOML. parsefile (project_path)
124- if haskey (d, " version" )
125- stdlibs[uuid] = (name, VersionNumber (d[" version" ]))
117+ # We're going to try and get versions for each stdlib:
118+ stdlib_path = readchomp (` $(jlexe) $(jlflags) -e 'import Pkg; print(Pkg.Types.stdlib_path(""))'` )
119+ for uuid in keys (stdlibs)
120+ # If this stdlib has a `Project.toml`, try to parse it for its version field
121+ name = first (stdlibs[uuid])
122+ project_path = joinpath (stdlib_path, name, " Project.toml" )
123+ if isfile (project_path)
124+ d = TOML. parsefile (project_path)
125+ if haskey (d, " version" )
126+ stdlibs[uuid] = (name, VersionNumber (d[" version" ]))
127+ end
126128 end
127129 end
130+ else
131+ stdlibs = Dict {Base.UUID, Tuple} (uuid => (name, version) for (uuid, (name, version)) in eval (Meta. parse (stdlibs_str)))
128132 end
129133
130134 return (jlvers, stdlibs)
0 commit comments