Skip to content

Commit 20e48da

Browse files
committed
Use eval
1 parent 2e7843b commit 20e48da

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,9 @@ run_if() (
2626
)
2727

2828
unit() (
29-
build_flags=()
30-
test_flags=()
31-
eval "build_flags+=(${BUILD_FLAGS:-})"
32-
eval "test_flags+=(${TEST_FLAGS:-})"
33-
run_if "${LINT:-true}" cargo clippy "$@" -- -D warnings
34-
run_if "${BUILD:-true}" cargo build "${build_flags[@]}" "$@"
35-
run_if "${TEST:-true}" cargo test "${test_flags[@]}" "$@"
29+
eval run_if "${LINT:-true}" cargo clippy "$@" -- -D warnings
30+
eval run_if "${BUILD:-true}" cargo build "${BUILD_FLAGS:-}" "$@"
31+
eval run_if "${TEST:-true}" cargo test "${TEST_FLAGS:-}" "$@"
3632
)
3733

3834
run_if "${FMT:-true}" cargo fmt

0 commit comments

Comments
 (0)