Skip to content

Commit

Permalink
Allow multiple packages to be added/removed in a batch (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored and stevengj committed Nov 8, 2018
1 parent 1a5d1d6 commit 2b55e10
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Conda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,15 @@ function _install_conda(env::Environment, force::Bool=false)
end
end

"Install a new package."
function add(pkg::AbstractString, env::Environment=ROOTENV)
const PkgOrPkgs = Union{AbstractString, AbstractVector{<: AbstractString}}

"Install a new package or packages."
function add(pkg::PkgOrPkgs, env::Environment=ROOTENV)
runconda(`install $(_quiet()) -y $pkg`, env)
end

"Uninstall a package."
function rm(pkg::AbstractString, env::Environment=ROOTENV)
"Uninstall a package or packages."
function rm(pkg::PkgOrPkgs, env::Environment=ROOTENV)
runconda(`remove $(_quiet()) -y $pkg`, env)
end

Expand Down

0 comments on commit 2b55e10

Please sign in to comment.