fix rust error when choose a non-default version. (#111)
port of https://github.com/microsoft/vscode-dev-containers/pull/1592
This commit is contained in:
parent
ec1deb8280
commit
58e425039a
4 changed files with 32 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "rust",
|
"id": "rust",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"name": "Rust",
|
"name": "Rust",
|
||||||
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
"description": "Installs Rust, common Rust utilities, and their required dependencies",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
|
@ -179,8 +179,8 @@ else
|
||||||
apt-get -y install --no-install-recommends git
|
apt-get -y install --no-install-recommends git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ${RUST_VERSION} | grep -q "nightly"
|
is_nightly=0
|
||||||
is_nightly=$?
|
echo ${RUST_VERSION} | grep -q "nightly" || is_nightly=$?
|
||||||
if [ $is_nightly = 0 ]; then
|
if [ $is_nightly = 0 ]; then
|
||||||
check_nightly_version_formatting RUST_VERSION
|
check_nightly_version_formatting RUST_VERSION
|
||||||
else
|
else
|
||||||
|
|
15
test-scenarios/rust_at_pinned_version.sh
Normal file
15
test-scenarios/rust_at_pinned_version.sh
Normal file
|
@ -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
|
|
@ -92,6 +92,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust_at_pinned_version": {
|
||||||
|
"image": "ubuntu:focal",
|
||||||
|
"features": {
|
||||||
|
"rust": {
|
||||||
|
"version": "1.62.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"install_cudnn_nvxt": {
|
"install_cudnn_nvxt": {
|
||||||
"image": "debian",
|
"image": "debian",
|
||||||
"features": {
|
"features": {
|
||||||
|
|
Loading…
Reference in a new issue