Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple packages to be added/removed in a batch #130

Merged
merged 1 commit into from
Nov 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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