mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-14 18:13:01 +00:00
SECRETS_TEST_VERBOSE
can be 0
(#816)
* `SECRETS_TEST_VERBOSE` can be `0` * Update _git_secret_tools.sh
This commit is contained in:
parent
db03c638d5
commit
a97dd7ffa8
@ -190,7 +190,7 @@ function _temporary_file {
|
||||
# which will be removed on system exit.
|
||||
temporary_filename=$(_os_based __temp_file) # is not `local` on purpose.
|
||||
|
||||
trap 'if [[ -f "$temporary_filename" ]]; then if [[ -n "$_SECRETS_VERBOSE" ]] || [[ -n "$SECRETS_TEST_VERBOSE" ]]; then echo "git-secret: cleaning up: $temporary_filename"; fi; rm -f "$temporary_filename"; fi;' EXIT
|
||||
trap 'if [[ -f "$temporary_filename" ]]; then if [[ -n "$_SECRETS_VERBOSE" ]] || [[ "$SECRETS_TEST_VERBOSE" == 1 ]]; then echo "git-secret: cleaning up: $temporary_filename"; fi; rm -f "$temporary_filename"; fi;' EXIT
|
||||
}
|
||||
|
||||
|
||||
|
@ -324,7 +324,7 @@ function unset_current_state {
|
||||
stop_gpg_agent
|
||||
|
||||
# SECRETS_TEST_VERBOSE is experimental
|
||||
if [[ -n "$SECRETS_TEST_VERBOSE" ]]; then
|
||||
if [[ "$SECRETS_TEST_VERBOSE" == 1 ]]; then
|
||||
# display the captured output as bats diagnostic (fd3, preceded by '# ')
|
||||
sed "s/^/# $BATS_TEST_DESCRIPTION: VERBOSE OUTPUT: /" < "$TEST_OUTPUT_FILE" >&3
|
||||
|
||||
@ -352,7 +352,7 @@ function unset_current_state {
|
||||
}
|
||||
|
||||
# show output if we wind up manually removing the test output file in a trap
|
||||
trap 'if [[ -f "$TEST_OUTPUT_FILE" ]]; then if [[ -n "$SECRETS_TEST_VERBOSE" ]]; then echo "git-secret: test: cleaning up: $TEST_OUTPUT_FILE"; fi; rm -f "$TEST_OUTPUT_FILE"; fi;' EXIT
|
||||
trap 'if [[ -f "$TEST_OUTPUT_FILE" ]]; then if [[ "$SECRETS_TEST_VERBOSE" == 1 ]]; then echo "git-secret: test: cleaning up: $TEST_OUTPUT_FILE"; fi; rm -f "$TEST_OUTPUT_FILE"; fi;' EXIT
|
||||
|
||||
function bats_diag_file {
|
||||
local filename=$1
|
||||
|
Loading…
Reference in New Issue
Block a user