> What message gets printed by bash when trying to invoke an executable > whose dependent library can't be found? Even if the user does get > the popup box, the bash script can still be made to treat that the same > as /bin/sh not being installed, as its trigger to update to the current > version of bash. In other words, the popup box would be annoying, > but would not prevent the upgrade from happening.
Answering myself, I just uninstalled libkpathsea*, then tried to invoke lilypond. Bash reports an exit status of 128 (which doesn't match any signal name), and prints nothing, but the following idiom would allow me to check for failed invocations, once the user clicks the popup box away [RANT - why can't Windows give us a means to find out about missing dependencies without a stupid modal box?]: case `/bin/sh --version 2>/dev/null || echo invocation failed` in GNU\ bash* | Illegal\ option\ --* | *No\ such\ file*) # working bash, ash, or missing /bin/sh, so upgrade ;; invocation\ failed) # no output whatsoever, assume broken bash, so upgrade ;; *) # Some other output, regardless of whether in included # "invocation failed", so leave alone esac Or, I could first do "cygcheck /bin/sh.exe", and see if "Error: could not find <libname>.dll" appears in the output, before ever trying to invoke /bin/sh --version. -- Eric Blake