Skip to content

Commit db7ca82

Browse files
Merge pull request #409 from Distributive-Network/Xmader/fix/windows-build-find-cargo
Fix Windows build for finding the `cargo` executable
2 parents 5fc6ce0 + b0dd7d0 commit db7ca82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ fi
3434
# Install rust compiler
3535
echo "Installing rust compiler"
3636
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.76
37-
. $HOME/.cargo/env
38-
cargo install cbindgen
37+
CARGO_BIN="$HOME/.cargo/bin/cargo" # also works for Windows. On Windows this equals to %USERPROFILE%\.cargo\bin\cargo
38+
$CARGO_BIN install cbindgen
3939
# Setup Poetry
4040
echo "Installing poetry"
4141
curl -sSL https://install.python-poetry.org | python3 - --version "1.7.1"
4242
if [[ "$OSTYPE" == "msys"* ]]; then # Windows
4343
POETRY_BIN="$APPDATA/Python/Scripts/poetry"
4444
else
45-
POETRY_BIN=`echo ~/.local/bin/poetry` # expand tilde
45+
POETRY_BIN="$HOME/.local/bin/poetry"
4646
fi
4747
$POETRY_BIN self add 'poetry-dynamic-versioning[plugin]'
4848
echo "Done installing dependencies"

0 commit comments

Comments
 (0)