/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
scripts/integration-tests/utils/cleanup.sh
31 строка
704 B
Huáng Jùnliàng
Fix Node.js 24 CI error (#17294)
07 май 2025, 17:55
Не верифицирован
07 май 2025, 17:55
6d749d2
Код
Авторство
О чём код?
#!/usr/bin/env bash function cleanup { echo "Cleaning up." stopLocalRegistry if [ -n "$GIT_E2E_SETUP" ]; then cleanupE2Egit fi } # Error messages are redirected to stderr function handle_error { echo "$(basename $0): ERROR! An error was encountered executing line $1." 1>&2; cleanup echo "Exiting with error." 1>&2; cat $HOME/.npm/_logs/*.log exit 1 } function handle_exit { cleanup echo "Exiting without error." 1>&2; exit } # Exit the script with a helpful error message when any error is encountered trap 'set +x; handle_error $LINENO $BASH_COMMAND' ERR # Cleanup before exit on any termination signal trap 'set +x; handle_exit' SIGQUIT SIGTERM SIGINT SIGKILL SIGHUP