Skip to content

Commit

Permalink
Avoid always using binaries in target/release
Browse files Browse the repository at this point in the history
  • Loading branch information
sveitser committed May 23, 2024
1 parent 5c3bfbb commit 5e2d7d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/demo-native
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail

# If we aren't in a nix shell (where this handled in flake.nix) add the target
# directory to the path so that the process-compose binary can be found.
if [ -z "${IN_NIX_SHELL-}" ]; then
REPO_ROOT="$(dirname "$(dirname "$(readlink -fm "$0")")")"
# Default to CARGO_TARGET_DIR if set, otherwise use the default target directory.
TARGET_DIR="${CARGO_TARGET_DIR:-${REPO_ROOT}/target}"
export "PATH=${TARGET_DIR}/release:$PATH"
fi

export PATH=./target/release:$PATH

ESPRESSO_BASE_STORAGE_PATH=$(mktemp -d -t espresso-XXXXXXXX)
Expand Down

0 comments on commit 5e2d7d5

Please sign in to comment.