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.
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.