Skip to content

Wrong default type in repo variable in source.pp #1221

@thka2315

Description

@thka2315

Describe the Bug

If the source class is called without the repos parameter you get an error saying "For deb822 sources, 'repos' must be specified as an array. Converting to array."

Expected Behavior

No error should be displayed.

Steps to Reproduce

apt::source { 'puppetlabs':
location => 'http://apt.puppetlabs.com',
keyring => '/etc/apt/keyrings/puppetlabs.asc';
}

Environment

  • Version 10.0.1
  • Platform Ubuntu 20.04

Additional Context

My suggestion is to change the repos default parameter to a list in source.pp to "Variant[String[1], Array[String[1]]] $repos = ['main'],".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions