autopif2.sh: abort if --depth arg is not a single digit positive integer

This commit is contained in:
Chris Renshaw
2025-06-01 21:54:05 -03:00
committed by GitHub
parent 1745060524
commit 05520f7881

View File

@@ -14,7 +14,7 @@ until [ -z "$1" ]; do
-a|--advanced|advanced) ARGS="-a"; shift;;
-s|--strong|strong) ARGS="-a"; PATCH_COMMENT=1; spoofProvider=0; shift;;
-p|--preview|preview) FORCE_PREVIEW=1; shift;;
-d|--depth|depth) FORCE_DEPTH=$2; shift 2;;
-d|--depth|depth) echo "$2" | grep -q '^[1-9]$' || exit 1; FORCE_DEPTH=$2; shift 2;;
*) break;;
esac;
done;