Skip to content

python::pip - empty pkgname is silently ignored #67

@giavac

Description

@giavac

Trying this module out for the first time I wanted to use the simplest definition possible to install a module with pip.
So I used:
python::pip { 'requests':
ensure => latest,
}
The catalog compiled without complaining, but the result wasn't as expected.
Then I noticed that "pip install --upgrade" was in fact executed, but with empty package name, e.g.:

debug: Executing 'pip wheel --help > /dev/null 2>&1 && { pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; pip --log //pip.log install --upgrade $wheel_support_flag '

So I realized the right way to do it was:
python::pip { 'requests':
pkgname => 'requests',
ensure => latest,
}
which works.

Shouldn't $pkgname be evaluated and forced to be a string? e.g. with something like stdlib::validate_string()?
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions