dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X
http://www.controlplaneapp.com
BSD 3-Clause "New" or "Revised" License
1.76k stars 180 forks source link

Running interactive shell scripts #468

Closed ssbarnea closed 7 years ago

ssbarnea commented 7 years ago

I do have a shell script that may need to prompt for password in some cases.

Would it be possible to run the shell script interactively? Is there a switch?

Also it would be helpful to know if a script failed to execute successfully. It may be my lack of knowledge about ControlPlane but my impression is that there is zero feedback regarding execution of shell scripts. We don't know if they fail to run, or even missing, if they are successful or if they are stuck running endlessly.

dustinrue commented 7 years ago

ControlPlane won't support interactive scripts. What you want is to build an expect script around the script in question if you can't modify the shell script.

If I remember correctly a script that exits with a status of 0 (exit 0) will be reported as a success to ControlPlane and ControlPlane will report success or failure properly.