Skip to content

Commit

Permalink
Don't return pip install with no packages
Browse files Browse the repository at this point in the history
If an empty list is provided no command should be returned to avoid a
broken command eg. `pip install      `
  • Loading branch information
judahrand committed Sep 8, 2021
1 parent 361142b commit d83933d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/kfp/v2/components/component_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _python_function_name_to_component_name(name):
def _get_packages_to_install_command(
package_list: Optional[List[str]] = None) -> List[str]:
result = []
if package_list is not None:
if package_list:
install_pip_command = 'python3 -m ensurepip'
install_packages_command = (
'PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet \
Expand Down

0 comments on commit d83933d

Please sign in to comment.