Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Consider types - integers and booleans at least #101

Closed

Description

@skx

The http module allows a HTTP-status code to be matched, which looks odd as a string. Similarly file-permissions for the file module must currently be expressed as a string because we have no support for numeric types.

Additionally the shell module has a shell => "true" option, which could be a boolean. Although there's no obvious other place where that is used yet.

I think we should parse values as either strings or numbers. We don't necessarily need to make any changes to usage the "StringValue" can convert at run-time easily enough.

The conversion could happen in the parser, or later. But the end result would be that:

  "mode" => 0755

Or

"expect" => 200

Would be synonymous with "mode => "0755" or "expect => "200".

Activity

  1. self-assigned this
    on Feb 13, 2022
  2. alexwhitman commented on Feb 13, 2022

    @alexwhitman
    Contributor

    There's also force => "yes" in the docker module and update => "yes" in the package module which could also be booleans.

  3. skx commented on Feb 13, 2022

    @skx
    OwnerAuthor

    Good catch, thanks!

  4. added a commit that references this issue on Feb 20, 2022
    d3e8021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址