Skip to content

Commit ed70ee3

Browse files
authored
Make curl in install scripts show errors and exit with non-zero status (#150)
Only `-f` and `-S` are new. Both these new flags could potentially have surfaced an underlying issue in databricks/cli#2307. With this change, all curl invocations in this repo use the same set of flags. Description: * `-f` / `--fail` Silently fails on HTTP errors (e.g., 404, 500). Prevents output of error pages to stdout/stderr, returning exit code 22 instead. Critical for scripting to avoid processing invalid responses. * `-s` / `--silent` Suppresses progress meters, error messages, and other non-essential output. Ensures clean output for piping or saving to files. * `-S` / `--show-error` Overrides -s to display errors if they occur. Balances silent operation with actionable error reporting. * `-L` / `--location` Follows HTTP redirects (3xx responses). Essential for URLs that point to mirrored or updated resources (e.g., download links that redirect to CDNs).
1 parent 1cec11e commit ed70ee3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ tmpdir="$(mktemp -d)"
8080
cd "$tmpdir"
8181

8282
# Download release archive.
83-
curl -L -s -O "https://github.com/databricks/cli/releases/download/v${VERSION}/${FILE}.zip"
83+
curl -fsSL -O "https://github.com/databricks/cli/releases/download/v${VERSION}/${FILE}.zip"
8484

8585
# Unzip release archive.
8686
unzip -q "${FILE}.zip"

setup_release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ esac
4242
cd "$RUNNER_TEMP"
4343

4444
# Download release archive.
45-
curl -L -s -O "https://github.com/databricks/cli/releases/download/v${VERSION}/${FILE}.zip"
45+
curl -fsSL -O "https://github.com/databricks/cli/releases/download/v${VERSION}/${FILE}.zip"
4646

4747
# Unzip release archive.
4848
unzip -q "${FILE}.zip" -d .bin

0 commit comments

Comments
 (0)