cleanup output when we clean up tmp files (#532)

* cleanup output when we clean up tmp files
pull/533/head^2
Josh Rabinowitz 5 years ago committed by GitHub
parent 525305d985
commit 2a1600f2f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -466,14 +466,12 @@ function _find_and_clean_formatted {
# required:
local pattern="$1" # can be any string pattern
if [[ -n "$_SECRETS_VERBOSE" ]]; then
echo && _message "cleaning:"
fi
local outputs
outputs=$(_find_and_clean "$pattern" 2>&1)
_find_and_clean "$pattern"
if [[ -n "$_SECRETS_VERBOSE" ]]; then
echo
if [[ -n "$_SECRETS_VERBOSE" ]] && [[ -n "$outputs" ]]; then
# shellcheck disable=SC2001
echo "$outputs" | sed "s/^/git-secret: cleaning: /"
fi
}

@ -5,9 +5,6 @@ load _test_base
FIRST_FILE="$TEST_DEFAULT_FILENAME"
SECOND_FILE="$TEST_SECOND_FILENAME"
FOLDER="somedir"
FILE_IN_FOLDER="${FOLDER}/file_to_hide3"
function setup {
install_fixture_key "$TEST_DEFAULT_USER"
@ -25,7 +22,6 @@ function setup {
function teardown {
# This also needs to be cleaned:
rm "$FIRST_FILE" "$SECOND_FILE"
rm -r "$FOLDER"
uninstall_fixture_key "$TEST_DEFAULT_USER"
unset_current_state

Loading…
Cancel
Save