Browse Source

source/file not found done

main
pvincent 2 weeks ago
parent
commit
d97185c5e8
  1. 15
      bin/miaou-bash

15
bin/miaou-bash

@ -96,9 +96,18 @@ function on_exit {
else
regex='^(.*): No such file or directory$'
if [[ "$message" =~ $regex ]]; then
#TODO: SOURCE_NOT_FOUND or FILE_NOT_FOUND
failure_type='SOURCE NOT FOUND'
failure_payload="${BASH_REMATCH[1]} line=${line}"
failure_payload="${BASH_REMATCH[1]}"
if [[ $code == 1 ]]; then
failure_type='SOURCE NOT FOUND'
stack_lines[0]=$line
else
if [[ $code == 127 ]]; then
failure_type='FILE NOT FOUND'
# TODO: print a warning hint in stderr like so: prefer source rather than subshell
else
failure_type='UNKNOWN NOT FOUND'
fi
fi
else
failure_type='UNKNOWN'
failure_payload="${message}"

Loading…
Cancel
Save