1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-11-08 09:09:17 +01:00

Better error message when failing

This commit is contained in:
Mahdi Bahrami 2023-02-26 19:30:57 +03:30 committed by GitHub
parent 36e66b545e
commit 6c5ba7cc01
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -141,7 +141,7 @@ git clone -q https://github.com/rust-lang/rustlings "$Path"
cd "$Path"
Version=$(curl -s https://api.github.com/repos/rust-lang/rustlings/releases/latest | ${PY} -c "import json,sys;obj=json.load(sys.stdin);print(obj['tag_name']);")
Version=$(curl -s https://api.github.com/repos/rust-lang/rustlings/releases/latest | ${PY} -c "import json,sys;obj=json.load(sys.stdin);print(obj['tag_name']) if 'tag_name' in obj else sys.exit(f\"Error: {obj['message']}\");")
CargoBin="${CARGO_HOME:-$HOME/.cargo}/bin"
if [[ -z ${Version} ]]