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

Set the type of sdImage.*Commands options to types.lines #100

@thislooksfun

Description

@thislooksfun

Currently the sdImage.*Commands options have no explicit type. This leads to some confusing and counter-intuitive behavior when trying to augment/override them. Namely, defining one of the options twice results in the two values being concatenated together with no separator.

For example, if one config defines sdImage.populateRootCommands = "echo 'first'"; and a second config defines sdImage.populateRootCommands = "echo 'second'"; the final value of populateRootCommands would end up being "echo 'first'echo 'second'".

To fix this we need to give the sdImage.*Commands options an explicit type.

I want to further propose that the type used is types.lines rather than type.str. Using types.lines means that multiple definitions will be concatenated together using new lines. This means that the above example would instead result in:

echo 'first'
echo 'second'

This is how other similar options work, such as system.activationScripts.

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