Skip to content

attribute to require interactive terminal #3271

Description

@robjtede

I've made a PoC for configurations attributes: [interactive] and [not-interactive] which can enable/disable recipes based on the equivalent of [ -t 1 ] in bash.

I've come across a sitation where I want to run slightly different commands in either situation but switching the recipe to use bash makes it kinda ugly. This may also help in a situation where an agent is selecting a recipe to not getting stuck in a TUI, for example.

Here's the diff: master...robjtede:just:interactive-attribute

Not sure what you think about adding this as a configuation attribute, given the only others of those are the OS selection ones. Didn't take much time to write up so if you're opposed in general no harm done. Otherwise, I can get that diff in a better state and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions