We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
approvals.bash
1 parent f028230 commit 863bf9aCopy full SHA for 863bf9a
lib/bashly/libraries/test/approvals.bash
@@ -1,4 +1,4 @@
1
-# approvals.bash v0.4.1
+# approvals.bash v0.4.2
2
#
3
# Interactive approval testing for Bash.
4
# https://github.com/DannyBen/approvals.bash
@@ -9,7 +9,7 @@ approve() {
9
cmd=$1
10
last_exit_code=0
11
actual=$(eval "$cmd" 2>&1) || last_exit_code=$?
12
- if [[ "$allow_diff_regex" ]]; then
+ if [[ -v allow_diff_regex && "$allow_diff_regex" ]]; then
13
actual=$(echo "$actual" | sed -E "s/$allow_diff_regex/*/g")
14
unset allow_diff_regex
15
fi
0 commit comments