Skip to content

Commit

Permalink
more reliably determine where elm-forbid-import lives
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Nov 20, 2020
1 parent 061c80d commit 18af59d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions script/run-integration-tests.sh
Expand Up @@ -2,11 +2,9 @@
set -euo pipefail
IFS=$'\n\t'

if test -d target/debug; then
if ! command -v elm-forbid-import; then
cargo build
BIN_PATH="$(pwd)/target/debug"
elif test -d target/release; then
BIN_PATH="$(pwd)/target/release"
PATH="$(pwd)/target/debug:$PATH"
fi

mkdir tmp
Expand All @@ -24,7 +22,7 @@ run_test() {
CURRENT="$GOLDEN.current"

echo "===== $NAME"
env PATH="$BIN_PATH:$PATH" ELM_FORBID_IMPORT_CONFIG="tmp/forbidden-imports.toml" bash -xeou pipefail "$TEST_FILE" > "$CURRENT"
env ELM_FORBID_IMPORT_CONFIG="tmp/forbidden-imports.toml" bash -xeou pipefail "$TEST_FILE" > "$CURRENT"

if ! test -e "$GOLDEN"; then
cp "$CURRENT" "$GOLDEN"
Expand Down

0 comments on commit 18af59d

Please sign in to comment.