cr icon indicating copy to clipboard operation
cr copied to clipboard

Support for read / prompt / dialogue input

Open reggi opened this issue 8 years ago • 1 comments

I have a simple example below, where I'd want user input then continue the next script that uses the variable set from read.

Jobs:
  - Id: 'setExample'
    Run: 'echo "Give me an example:" && read EXAMPLE && export EXAMPLE'
  - Id: 'echoExample'
    Run: 'echo $EXAMPLE'
    DependsOn: [ 'setExample' ]

reggi avatar Dec 18 '17 18:12 reggi

Right now it just fails

➜  xxx git:(master) ✗ ../cr --file ./cr-example.yaml --stdout

        Starting execution.

        Logs directory: /tmp

setExample              status=STARTED  start=13:01:12
Give me an example:
setExample              status=ERRORED  start=13:01:12  elapsed=6.010576ms
{"level":"fatal","from":"main","error":"jobs execution failed: execution of jobs failed: 1 error occurred:\n\n* setExample: command execution failed: exit status 1","message":"main execution failed"}

reggi avatar Dec 18 '17 18:12 reggi