Skip to content

Commit

Permalink
Work around the bats linter.
Browse files Browse the repository at this point in the history
The linter didn't want the first instance of `$ENGINE_CONFIG` in the [[ ... ]]
sequence to be double-quoted, but it needs to be on macOS because of the space in
`~/Library/Application Support/`...

The linter is ok with specifying it as `[ test1 ] && [ test2 ]` instead.

Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed Jul 21, 2023
1 parent 28ac090 commit 80ac720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bats/tests/helpers/vm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ factory_reset() {
capture_logs
fi
ENGINE_CONFIG="${PATH_APP_HOME}/rd-engine.json"
if [[ -f "$ENGINE_CONFIG" && -z "$(cat "$ENGINE_CONFIG")" ]]; then
if [ -f "$ENGINE_CONFIG" ] && [ -z "$(cat "$ENGINE_CONFIG")" ]; then
rm "$ENGINE_CONFIG"
fi

Expand Down

0 comments on commit 80ac720

Please sign in to comment.