Skip to content

Commit

Permalink
Fix infinite loop in universe tests
Browse files Browse the repository at this point in the history
Signed-off-by: Solomon Hykes <solomon@dagger.io>
  • Loading branch information
shykes committed Jun 10, 2021
1 parent e5aa981 commit c1096fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stdlib/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ common_setup() {
load 'node_modules/bats-assert/load'

# Dagger Binary
DAGGER="${DAGGER_BINARY:-$(command -v dagger)}"
export DAGGER
# FIXME: `command -v` must be wrapped in a sub-bash,
# otherwise infinite recursion when DAGGER_BINARY is not set.
export DAGGER="${DAGGER_BINARY:-$(bash -c 'command -v dagger')}"

# Set the workspace to the universe directory (so tests can run from anywhere)
UNIVERSE="$( cd "$( dirname "$BATS_TEST_FILENAME" )" >/dev/null 2>&1 && pwd )"
Expand Down Expand Up @@ -44,4 +45,4 @@ copy_to_sandbox() {
local target="$DAGGER_SANDBOX"/.dagger/env/"$name"

cp -a "$source" "$target"
}
}

0 comments on commit c1096fb

Please sign in to comment.