Skip to content

Commit

Permalink
Avoid always using binaries in target/release (#1498)
Browse files Browse the repository at this point in the history
* Avoid always using binaries in target/release

* fix comment
  • Loading branch information
sveitser authored May 23, 2024
1 parent 5c3bfbb commit ec2e7be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/demo-native
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

export PATH=./target/release:$PATH
# If we aren't in a nix shell (where this handled in flake.nix) add the target
# directory to the path so that the binaries are found by process-compose.
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

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

0 comments on commit ec2e7be

Please sign in to comment.