Red Hat Bugzilla – Bug 846209
bash "read" does not work inside publish script
Last modified: 2014-10-19 19:01:16 EDT
as a publish script, it consistently fails at the "read" line, simply stopping - not taking further input or continuing to execute.
Executing the script in a standalone environment, outside the publish script it works as expected.
Seems to be something to do with the way csprocessor calls the script.
I need to have a "Press Y to continue, N to cancel" type thing in my script.
It was cspclient 0.26.1 on my other machine, so I'll generate the JVM version and add later to this bug.
No need to generate the details unless you want. I can easily confirm this as STDIN is handled by Java and not piped to the scripts. Whether or not that should be allowed is something I want to think on and discuss with the team first.
Here's my use case:
In my publish script I assemble the book, run some pre-processing on the xml, build it, then display it in a web browser for a final visual inspection before doing the rhpkg.
At that point I want to prompt: "Everything OK with this build? Shall I publish? [Y/N]"
I haven't talked this over with the team yet but I couldn't come up with any immediate reason not to add this besides trying block custom scripts somewhat. However in saying that I still think this should be added.
Added in 0.26.5.
The CSP will now pipe STDIN through to the underlying scripts for the publish command only.
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.