Skip to content

Commit

Permalink
Allow name=*|--all state=latest to update all packages
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Oct 20, 2017
1 parent d4d544f commit a4d0aeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def _update_package(module, conda, installed, name):
if not installed:
module.fail_json(msg='can\'t update a package that is not installed')

if name == '*':
name = '--all'

# see if it's already installed at the latest version
command = [
conda,
Expand Down Expand Up @@ -284,7 +287,10 @@ def main():
state = module.params['state']
version = module.params['version']

installed, installed_version = _check_installed(module, conda, name)
if name == '*' or name == '--all':
installed = True
else:
installed, installed_version = _check_installed(module, conda, name)

if state == 'absent':
_remove_package(module, conda, installed, name)
Expand Down

0 comments on commit a4d0aeb

Please sign in to comment.