ci: устойчивый карантин зависимостей (grep под set -e)
ci / test (push) Successful in 1m48s
ci / lint (push) Successful in 3m50s

grep -v без совпадений возвращает 1; в sh -e это роняло шаг. Добавлен || true.
This commit is contained in:
Maksim Totmin
2026-09-14 00:37:20 +07:00
parent 3018bae23e
commit 39a38bfd74
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ jobs:
run: |
direct=$(go list -m -f '{{if not .Main}}{{if not .Indirect}}{{.Path}}{{end}}{{end}}' all)
allowed='^(github.com/modelcontextprotocol/go-sdk|gopkg.in/yaml.v3|github.com/BurntSushi/toml)$'
bad=$(echo "$direct" | grep -vE "$allowed" | grep -v '^$')
bad=$(echo "$direct" | grep -vE "$allowed" | grep -v '^$' || true)
if [ -n "$bad" ]; then
echo "недопустимые прямые зависимости:"; echo "$bad"; exit 1
fi
echo "toolkit-deps: ok"