From 8454cb2631c209b40140d97fc885b1a7721c2683 Mon Sep 17 00:00:00 2001 From: Mees Frensel <33722705+meesfrensel@users.noreply.github.com> Date: Wed, 15 Apr 2026 16:09:51 +0200 Subject: [PATCH] chore: exit open-api script on errors (#27815) --- open-api/bin/generate-open-api.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/open-api/bin/generate-open-api.sh b/open-api/bin/generate-open-api.sh index 522063185f..83a6df31a8 100755 --- a/open-api/bin/generate-open-api.sh +++ b/open-api/bin/generate-open-api.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash OPENAPI_GENERATOR_VERSION=v7.12.0 +set -euo pipefail + # usage: ./bin/generate-open-api.sh function dart { @@ -39,9 +41,9 @@ function typescript { pnpm --filter immich sync:open-api ) -if [[ $1 == 'dart' ]]; then +if [[ $# -ge 1 ]] && [[ $1 == 'dart' ]]; then dart -elif [[ $1 == 'typescript' ]]; then +elif [[ $# -ge 1 ]] && [[ $1 == 'typescript' ]]; then typescript else dart