Skip to content

Commit

Permalink
Add Pkg2.installed(pkg) method
Browse files Browse the repository at this point in the history
As a follow-up to JuliaLang#4022, add this convenience method to test if a particular package is installed.
  • Loading branch information
mlubin committed Aug 12, 2013
1 parent 8752713 commit d579dfb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/pkg2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ function installed()
return pkgs
end

installed(pkg) = get(installed(),pkg,nothing)

status(io::IO=STDOUT) = Dir.cd() do
reqs = Reqs.parse("REQUIRE")
instd = Read.installed()
Expand Down

0 comments on commit d579dfb

Please sign in to comment.