Skip to content

Commit 2bf5352

Browse files
HavenDVclaude
andcommitted
Standardize generate.sh: dotnet tool install + curl --fail
Simplify tool install to just `dotnet tool install --global` (works whether already installed or not). Add --fail --silent --show-error to curl invocations so the script aborts on HTTP errors. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent bbea221 commit 2bf5352

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libs/Anthropic/generate.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ set -euo pipefail
33

44
dotnet tool install --global autosdk.cli --prerelease
55
rm -rf Generated
6-
curl -o .stats.yml https://raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/refs/heads/main/.stats.yml
6+
curl --fail --silent --show-error -o .stats.yml https://raw.githubusercontent.com/anthropics/anthropic-sdk-typescript/refs/heads/main/.stats.yml
77
openapi_spec_url=$(sed -n 's/^openapi_spec_url: //p' .stats.yml)
88
echo "OpenAPI spec URL: $openapi_spec_url"
99
rm .stats.yml
10-
curl -o openapi.yaml $openapi_spec_url
10+
curl --fail --silent --show-error -o openapi.yaml $openapi_spec_url
1111
if ! command -v yq >/dev/null 2>&1 || ! command -v jq >/dev/null 2>&1; then
1212
echo "jq and yq are required to patch the downloaded OpenAPI spec." >&2
1313
exit 1

0 commit comments

Comments
 (0)