Skip to content

Commit 9a9d48f

Browse files
add __version fix
1 parent 3375fca commit 9a9d48f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Dependencies.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ patch(v::VersionNumber) = v.patch
332332
major(v::Pkg.Types.VersionBound) = v.t[1]
333333
minor(v::Pkg.Types.VersionBound) = v.t[2]
334334
patch(v::Pkg.Types.VersionBound) = v.t[3]
335+
336+
# If a version in a PackageSpec is given as a string it signifies being a VersionSpec that Pkg will handle as such.
337+
__version(v::AbstractString) = __version(PKG_VERSIONS.VersionSpec(v))
335338
__version(v::VersionNumber) = v
336339
__version(v::PKG_VERSIONS.VersionSpec) = v.ranges[1].lower
337340
version(d::AbstractDependency) = __version(getpkg(d).version)

0 commit comments

Comments
 (0)