Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 02f8359

Browse files
authored
rust-debian.sh: fix set -e interaction with nightly rust detection (#1592)
Currently feature(rust) in devcontainer definition fails container build unless user specifies nightly rust. Issue was introduced in commit 10bf6f7 #1554 Lack of "nightly" in RUST_VERSION will result in nonzero return code from grep. This in turn triggers -e option set for the whole script. As a result build silently fails.
1 parent a37d74b commit 02f8359

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script-library/rust-debian.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ else
183183
apt_get_update_if_needed
184184
apt-get -y install --no-install-recommends git
185185
fi
186-
echo ${RUST_VERSION} | grep -q "nightly"
187-
is_nightly=$?
186+
is_nightly=0
187+
echo ${RUST_VERSION} | grep -q "nightly" || is_nightly=$?
188188
if [ $is_nightly = 0 ]; then
189189
check_nightly_version_formatting RUST_VERSION
190190
else

0 commit comments

Comments
 (0)