Skip to content
Open
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
9 changes: 8 additions & 1 deletion conda.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
Requires conda to already be installed.
options:
name:
description: The name of a Python package to install.
description: The name of a Python package to install. Can be "*" or "--all" combined with state=latest to update
all packages.
required: true
version:
description: The specific version of a package to install.
Expand Down Expand Up @@ -91,6 +92,12 @@ def run_package_operation(conda, name, version, state, dry_run, command_runner,
:param on_failure: method that takes any kwargs to be called on failure
:param on_success: method that takes any kwargs to be called on success
"""
# Special case to update all installed packages
if ( name == '*' or name == '--all' ) and state == 'latest':
output, stderr = run_conda_package_command(
command_runner, '--all', None, [conda, 'update', '--json', '--all'])
on_success(changed=True, output=output, stderr=stderr)

correct_version_installed = check_package_installed(command_runner, conda, name, version)

# TODO: State should be an "enum" (or whatever the Py2.7 equivalent is)
Expand Down