Skip to content

Commit

Permalink
chore(examples): use absolute path
Browse files Browse the repository at this point in the history
The `run-all` script used relative paths, which only work if the script
is executed from the project root directory. This commit ensures that
the script can be run from anywhere.

Signed-off-by: JP-Ellis <[email protected]>
  • Loading branch information
JP-Ellis committed Jan 10, 2025
1 parent e6a4cfe commit 8874e0c
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions examples/run-all
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -o errexit # Exit on error
set -o nounset # Treat unset variables as an error

EXAMPLES_DIR=$(cd -- "$(dirname "$0")" && pwd)

usage() {
echo "Usage: $0 [command]"
echo
Expand Down Expand Up @@ -59,20 +61,20 @@ main() {
fi

declare -a examples=(
examples/e2e
examples/graphql
examples/jest
examples/messages
examples/mocha
examples/serverless
examples/typescript
examples/v3/e2e
examples/v3/provider-state-injected
examples/v3/run-specific-verifications
examples/v3/todo-consumer
examples/v3/typescript
examples/v4/matchers
examples/v4/plugins
"$EXAMPLES_DIR/e2e"
"$EXAMPLES_DIR/graphql"
"$EXAMPLES_DIR/jest"
"$EXAMPLES_DIR/messages"
"$EXAMPLES_DIR/mocha"
"$EXAMPLES_DIR/serverless"
"$EXAMPLES_DIR/typescript"
"$EXAMPLES_DIR/v3/e2e"
"$EXAMPLES_DIR/v3/provider-state-injected"
"$EXAMPLES_DIR/v3/run-specific-verifications"
"$EXAMPLES_DIR/v3/todo-consumer"
"$EXAMPLES_DIR/v3/typescript"
"$EXAMPLES_DIR/v4/matchers"
"$EXAMPLES_DIR/v4/plugins"
)

if [ $# -gt 0 ]; then
Expand Down

0 comments on commit 8874e0c

Please sign in to comment.