Fix error handling in repo linter (#4104)

This commit is contained in:
Lai Jia Yang
2026-04-20 01:04:38 +08:00
committed by GitHub
parent 893fc57bdc
commit 4059268a10
+2 -1
View File
@@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
set -eo pipefail
# Find the repo in the git diff and then set it to an env variables. # Find the repo in the git diff and then set it to an env variables.
REPO_TO_LINT=$( REPO_TO_LINT=$(
@@ -15,7 +16,7 @@ if [ -z "$REPO_TO_LINT" ]; then
echo "No new link found in the format: https://....#readme" echo "No new link found in the format: https://....#readme"
else else
echo "Cloning $REPO_TO_LINT" echo "Cloning $REPO_TO_LINT"
mkdir cloned mkdir -p cloned
cd cloned cd cloned
git clone "$REPO_TO_LINT" . git clone "$REPO_TO_LINT" .
npx awesome-lint npx awesome-lint