Skip to content

Commit

Permalink
Fix lila-docker when CARGO_TARGET_DIR is set (#104)
Browse files Browse the repository at this point in the history
Co-authored-by: kraktus <[email protected]>
  • Loading branch information
kraktus and kraktus authored Jul 28, 2024
1 parent 7257684 commit f81ab60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lila-docker
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ run_mobile() {
rust_cmd() {
if command -v rustup &> /dev/null; then
# if the host has Rust installed, use it directly

# if `CARGO_TARGET_DIR` is set, use `CARGO_TARGET_DIR/release/command`, else use `command/target/release/command`
COMMAND_EXE="${CARGO_TARGET_DIR:-command/target}/release/command"

cargo build --release --manifest-path command/Cargo.toml
./command/target/release/command "$@"
eval "$COMMAND_EXE $@"
elif [ "$(uname)" = "Darwin" ]; then
docker run --rm -v "$PWD/command:/command" -w /command messense/cargo-zigbuild:0.19.1 \
cargo zigbuild --release --target universal2-apple-darwin
Expand Down

0 comments on commit f81ab60

Please sign in to comment.