Skip to content

Commit 59a18de

Browse files
committed
ci: Set -u (error on unset) in all script files
This is a pretty common flag to reduce errors. Make use of it here.
1 parent 22d4318 commit 59a18de

16 files changed

+16
-16
lines changed

ci/android-install-ndk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
set -ex
3+
set -eux
44

55
ndk=android-ndk-r27
66
wget --tries=20 -q "https://dl.google.com/android/repository/${ndk}-linux.zip"

ci/android-install-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
set -ex
3+
set -eux
44

55
# Prep the SDK and emulator
66
#

ci/android-sysimage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -ex
3+
set -eux
44

55
URL=https://dl.google.com/android/repository/sys-img/android
66

ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# The FILTER environment variable can be used to select which target(s) to build.
66
# For example: set FILTER to vxworks to select the targets that has vxworks in name
77

8-
set -ex
8+
set -eux
99

1010
: "${TOOLCHAIN?The TOOLCHAIN environment variable must be set.}"
1111
: "${OS?The OS environment variable must be set.}"

ci/docker/wasm32-unknown-emscripten/node-wrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
set -e
3+
set -eux
44

55
me="$1"
66
shift

ci/emscripten-entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -ex
3+
set -eux
44

55
# shellcheck disable=SC1091
66
source /emsdk-portable/emsdk_env.sh &> /dev/null

ci/emscripten.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -ex
3+
set -eux
44

55
# Note: keep in sync with:
66
# https://github.com/rust-lang/rust/blob/master/src/ci/docker/scripts/emscripten.sh

ci/install-musl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Install musl and musl-sanitized linux kernel headers
44
# to musl-{$1} directory
55

6-
set -ex
6+
set -eux
77

88
musl_version=1.1.24
99
musl="musl-${musl_version}"

ci/install-rust.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env sh
22
# This is intended to be used in CI only.
33

4-
set -ex
4+
set -eux
55

66
echo "Setup toolchain"
77
toolchain=

ci/linux-s390x.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
set -ex
3+
set -eux
44

55
mkdir -m 777 /qemu
66
cd /qemu

ci/linux-sparc64.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
set -ex
3+
set -eux
44

55
mkdir -m 777 /qemu
66
cd /qemu

ci/run-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Small script to run tests for a target (or all targets) inside all the
77
# respective docker images.
88

9-
set -ex
9+
set -eux
1010

1111
# Default to assuming the CARGO_HOME is one directory up (to account for a `bin`
1212
# subdir) from where the `cargo` binary in `$PATH` lives.

ci/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Builds and runs tests for a particular target passed as an argument to this
44
# script.
55

6-
set -ex
6+
set -eux
77

88
mirrors_url="https://ci-mirrors.rust-lang.org/libc"
99

ci/style.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
set -ex
3+
set -eux
44

55
rustc ci/style.rs && ./style src
66

ci/test-runner-linux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
set -e
3+
set -eux
44

55
arch="$1"
66
prog="$2"

ci/wasi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -ex
3+
set -eux
44

55
apt-get update
66
apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)