-- Sent from my iPad
>> On Nov 23, 2014, at 11:29 AM, Ryan Cunningham <rvskmbr...@gmail.com> wrote: >> >> On Nov 23, 2014, at 10:58 AM, Chet Ramey <chet.ra...@case.edu> wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >>> On 11/21/14 9:31 PM, Eric Blake wrote: >>> >>> $ bash --debugger foo >>> bash: debug script /usr/bin/bashdb: file not found >>> >>> to give me a heads up that I need to install bashdb. Would it make >>> sense to make the explicit use of --debugger be fatal if a debugger >>> start file is configured but not present? >> >> I think a better change is to report the error on opening the file, >> then turn off debugging mode but allow script execution to continue. >> Something like this: >> >> $ bash --debugger foo >> foo: /usr/local/share/bashdb/bashdb-main.inc: No such file or directory >> foo: warning: cannot start debugger; debugging mode disabled >> hello > > Maybe something like this: > > bash: foo: debugger /usr/local/share/bashdb/bashdb-main.inc: No such file or > directory > bash: foo: disabling debugging mode > hello > > Messages above that begin with "bash:" should be directed to file descriptor > 2. A similar error message (as below) should be given when the user tries to execute a debugger that permissions don't let him execute: bash: foo: debugger /usr/bin/x: Permission denied bash: foo: disabling debugging mode where /usr/bin/x is the path to the debugger. Of course, "Permission denied" can be replaced with any error valid here, as long as an attempt was indeed made to access the file in question. When the debug script was found successfully but exited with failure status, this message should be printed, where the number in parentheses is the debugger's exit code: bash: foo: debugger /usr/bin/x: Failed (1) and Bash itself should exit immediately with the same code. > >> >> Chet >> - -- >> ``The lyf so short, the craft so long to lerne.'' - Chaucer >> ``Ars longa, vita brevis'' - Hippocrates >> Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.12 (Darwin) >> Comment: GPGTools - http://gpgtools.org >> >> iEYEARECAAYFAlRyLmsACgkQu1hp8GTqdKsgOwCfb3SiB1jq4R9LzjI50NbsonAC >> LL4An2u9/xUTvrDJjsYrJxqp2u0VUTVE >> =EziL >> -----END PGP SIGNATURE----- >>