Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tasks to specify if they should use stdin or stdout directly #103

Open
corang opened this issue May 28, 2024 · 1 comment
Open

Allow tasks to specify if they should use stdin or stdout directly #103

corang opened this issue May 28, 2024 · 1 comment
Labels
enhancement ✨ New feature or request

Comments

@corang
Copy link

corang commented May 28, 2024

Is your feature request related to a problem? Please describe

There are times when using maru-runner that I'd like to run an interactive application or an application that rewrites lines (say it has a progress bar). Any interactive application is a non starter because stdin is not bound to the commands maru-runner runs. In the case of an application that rewrites lines you either have to hope the application has a (competent) ci mode or just deal with terminal spam when line rewrites happen.

Describe the solutions you'd like

1.
  • Given maru-runner is running a task with an interactive command
  • When interactive is specified in the task
  • Then the command is bound to stdin and stdout directly and the spinner is disabled
2.
  • Given maru-runner is running a task with a command that rewrites lines
  • When noSpinner is specified in the task (this is a bad name there's def a better one out there)
  • Then the command is bound to stdout directly and the spinner is disabled
@corang corang added the enhancement ✨ New feature or request label May 28, 2024
Racer159 added a commit that referenced this issue May 29, 2024
## Description

This slightly improves the spinner to allow for interactive programs to
run when `--no-progress` is provided.

## Related Issue

Relates to #103

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Other (security config, docs update, etc)

## Checklist before merging

- [X] Test, docs, adr added or updated as needed
- [X] [Contributor Guide
Steps](https://github.com/defenseunicorns/maru-runner/blob/main/CONTRIBUTING.md)
followed
@andrewg-xyz
Copy link

Additional use case (example):

image
I have a task uds run test:ui-unit that under the hood runs a process for unit testing and will rerun on code changes.

because uds runner swallows stdin, I cannot interact with this tool using h or q keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants