File: check_minified_errors.sh

package info (click to toggle)
node-react 17.0.1%2Bdfsg%2B~cs106.58.5-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,976 kB
  • sloc: javascript: 280,795; cpp: 1,326; sh: 84; makefile: 27
file content (14 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# Ensure errors are minified in production

OUT=$(git --no-pager grep -n --untracked --no-exclude-standard 'FIXME (minify-errors-in-prod)' -- './build/*')

if [ "$OUT" != "" ]; then
  echo "$OUT";
  echo -e "\n";
  echo "Detected an unminified error message in the production build. User-facing errors message must have a corresponding error code in scripts/error-codes/codes.json."
  exit 1
fi

exit 0