Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/ci/scripts/install-ninja.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ IFS=$'\n\t'

source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

# Check and set default values for variables
: "${MIRRORS_BASE:?MIRRORS_BASE is not set}"
: "${RUST_CONFIGURE_ARGS:=}"
Comment on lines +9 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Check and set default values for variables
: "${MIRRORS_BASE:?MIRRORS_BASE is not set}"
: "${RUST_CONFIGURE_ARGS:=}"
# Fail is variable is not set
: "${MIRRORS_BASE:?MIRRORS_BASE is not set}"
# Set the variable to an empty string if it's undefined
: "${RUST_CONFIGURE_ARGS:=}"


if isWindows; then
mkdir ninja
curl -o ninja.zip "${MIRRORS_BASE}/2024-03-28-v1.11.1-ninja-win.zip"
mkdir -p ninja
curl -fLo ninja.zip "${MIRRORS_BASE}/2024-03-28-v1.11.1-ninja-win.zip"
7z x -oninja ninja.zip
rm ninja.zip
ciCommandSetEnv "RUST_CONFIGURE_ARGS" "${RUST_CONFIGURE_ARGS} --enable-ninja"
Expand Down
Loading