Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How does Quickbuild handle input prompts during a shell/batch step #4198

OnQuickBuild ·

Hi Quickbuild

In my build process, it prompts for a password from user input (stdin). To automate this I used the Unix program "expect".
basically, it works locally; but when I do the same on Quickbuild on the same Linux machine, it seems the password is still received by the requesting program, but the ultimate resultant file is wrong. (If the password is wrong, the requesting program will complain and fail)

I'm still investigating the requesting program, trying to see why it didn't complain about the password but didn't generate the right file.

I noticed Quickbuild automatically blocks certain input prompt actions. Without "expect" and such, the shell/batch step won't wait for any user input, as if I simply press "Enter" without a password.

Could you provide some information about this Quickbuild behavior?

Thanks!

  • replies 5
  • views 1579
  • stars 0
robinshen ADMIN ·

QB wraps your commands in a temporal shell script, and call "sh -c" to execute the script. You may do the same from your own terminal and check if it works.

OnQuickBuild ·

When I test on my own terminal with "sh -c ./my_script password", I just need to wrap the command line string and execute it like so:

sh -c "./my_script password"

However, what if I need to put all the content of "my_script" in the shell/batch step command window. How am I supposed to quote the entire thing?

THanks

OnQuickBuild ·

This piece of information is kind of misleading. Because in the shell/batch step, when I simply have ./my_script password, the script outputs the argument, meaning it's passed in. The script prompts for password 4 times, but the last time has some problem. I haven't ruled out the requesting program has no problem receiving password this way.

OnQuickBuild ·

Hi Robin
There is one thing I would like to know. When there is input prompt in the build program in shell/batch step, how does Quickbuild handle it?
From what I can see, it's as if Quickbuild just presses empty "Enter" for me.

Thank you

robinshen ADMIN ·

QB does not try to send any input to executed command. You may simply put the command as content of QB command step:

sh -c "./my_script password"

By design, it should behavior the same as if you executed the command from terminal. If it prompts for a password, the step will hang infinitely as QB as an automation system has no way to supply interactive inputs.