diff --git a/src/rust/devcontainer-feature.json b/src/rust/devcontainer-feature.json index 016e464..8212b34 100644 --- a/src/rust/devcontainer-feature.json +++ b/src/rust/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "rust", - "version": "1.0.2", + "version": "1.0.3", "name": "Rust", "description": "Installs Rust, common Rust utilities, and their required dependencies", "options": { diff --git a/src/rust/install.sh b/src/rust/install.sh index 3970bb2..a84716c 100755 --- a/src/rust/install.sh +++ b/src/rust/install.sh @@ -179,8 +179,8 @@ else apt-get -y install --no-install-recommends git fi - echo ${RUST_VERSION} | grep -q "nightly" - is_nightly=$? + is_nightly=0 + echo ${RUST_VERSION} | grep -q "nightly" || is_nightly=$? if [ $is_nightly = 0 ]; then check_nightly_version_formatting RUST_VERSION else diff --git a/test-scenarios/rust_at_pinned_version.sh b/test-scenarios/rust_at_pinned_version.sh new file mode 100644 index 0000000..2954a7a --- /dev/null +++ b/test-scenarios/rust_at_pinned_version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "cargo version" cargo --version +check "rustc version" rustc --version +check "correct rust version" rustc --version | grep 1.62.0 + + +# Report result +reportResults \ No newline at end of file diff --git a/test-scenarios/scenarios.json b/test-scenarios/scenarios.json index 4f45aba..c7ec8af 100644 --- a/test-scenarios/scenarios.json +++ b/test-scenarios/scenarios.json @@ -6,8 +6,8 @@ "version": "latest", "installGradle": true, "installMaven": true - } - } + } + } }, "install_additional_php": { "image": "ubuntu:focal", @@ -15,9 +15,9 @@ "php": { "version": "8.1.4", "additionalVersions": "8.0.17,8.0.3" - } - } - }, + } + } + }, "install_additional_java": { "image": "ubuntu:focal", "features": { @@ -92,6 +92,14 @@ } } }, + "rust_at_pinned_version": { + "image": "ubuntu:focal", + "features": { + "rust": { + "version": "1.62.0" + } + } + }, "install_cudnn_nvxt": { "image": "debian", "features": { @@ -112,4 +120,4 @@ } } } -} +} \ No newline at end of file