message: path fix: gracefully handle errors
diff: #
  # NOTE: This implementation is far from perfect and will need to be refined to cover all cases.
  -set -e
  -
  $* 2>&1 |
  while IFS= read -r LINE
  do
  if [[ "${LINE}" =~ [[:space:]]*([^:[:space:]]+):[[:digit:]]+:[[:digit:]]+: ]]; then
  REAL_PATH=$(readlink -f "${BASH_REMATCH[1]}")
  + # Bazel now appears to sometimes spit out paths that don't actually exist on disk at all. I
  + # have no idea why this is happening (sigh). This check makes it so that if readlink fails we
  + # don't attempt to fix the path and just print out what we got.
  + if [[ $? == 0 ]]; then
  LINE=${LINE//${BASH_REMATCH[1]}/${REAL_PATH}}
  fi
  + fi
  echo "${LINE}"
  done
  