apps-cli-plugin icon indicating copy to clipboard operation
apps-cli-plugin copied to clipboard

Add timeout when user inputs workload through stdin

Open heyjcollins opened this issue 2 years ago • 2 comments

Description of problem

As per current behaviour, when user inputs a workload through stdin, if there is no file to read from, command keeps waiting until it's interrupted by ctrl+c command. There should be a timeout added as well as a warning message.

Proposed solution

There should be a timeout added as well as a warning message.

Given stdin is empty
When  attempting to create a workload by passing the workload.yaml from stdin 
Then the command will fail fast with a warning message indicating nothing was found in stdin

Example

Current $ tanzu apps workload create -f - -y (where stdin is empty) command will hang...

Proposed - @danfein to provide recommendation $ tanzu apps workload create -f - -y (where stdin is empty) ...

Additional context

  • #146
  • #300

Originally submitted by @warango4

heyjcollins avatar Mar 17 '22 18:03 heyjcollins