mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-09 04:09:20 +00:00
skip clone and checkout if on gitpod workspace
This commit is contained in:
parent
bc3808cf29
commit
469218f7e3
@ -135,7 +135,10 @@ else
|
|||||||
echo "SUCCESS: Rust is up to date"
|
echo "SUCCESS: Rust is up to date"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if GITPOD_WORKSPACE_ID environment variable exists
|
||||||
|
if [ -z "$GITPOD_WORKSPACE_ID" ]; then
|
||||||
Path=${1:-rustlings/}
|
Path=${1:-rustlings/}
|
||||||
|
|
||||||
echo "Cloning Rustlings at $Path..."
|
echo "Cloning Rustlings at $Path..."
|
||||||
git clone -q https://github.com/rust-lang/rustlings "$Path"
|
git clone -q https://github.com/rust-lang/rustlings "$Path"
|
||||||
|
|
||||||
@ -163,6 +166,9 @@ fi
|
|||||||
|
|
||||||
echo "Checking out version $Version..."
|
echo "Checking out version $Version..."
|
||||||
git checkout -q ${Version}
|
git checkout -q ${Version}
|
||||||
|
else
|
||||||
|
echo "GITPOD_WORKSPACE_ID found. Skipping git clone and git checkout."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Installing the 'rustlings' executable..."
|
echo "Installing the 'rustlings' executable..."
|
||||||
cargo install --force --path .
|
cargo install --force --path .
|
||||||
|
|||||||
1
rustlings
Submodule
1
rustlings
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 9a743f80c57cc6bf27819589a8ddb5a5579ab1a4
|
||||||
Loading…
x
Reference in New Issue
Block a user