Skip to content

Cookbook Version Overrides Chef_Version in Metadata #59

@RiverHeart

Description

@RiverHeart

Regex for the "Cookbook Version" task will accidentally replace chef_version if present in metadata.rb. Can be fixed by prepending ^ to the regex so it only matches strings starting with "version" instead of anything containing version.

replace({
regex: /version\s+['"].*['"]/,
replacement: sprintf("version '%s'", params["chefCookbookVersion"]),
paths: [params["chefCookbookMetadata"]]
});

chef_version described here

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