Skip to content

Commit

Permalink
chore: update debug mode message handling
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed May 9, 2024
1 parent bc1e09b commit 28627b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gh-find-code
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ kill_processes() {
cleanup() {
kill_processes "$store_query_pids"

$debug_mode && printf "%bDebug mode was ON, the following files weren't deleted.%b\n" "$YELLOW_NORMAL" "$COLOR_RESET"
command rm -rf "$scratch_directory" 2>/dev/null
if ! $debug_mode; then
command rm -rf "$debug_directory" 2>/dev/null
else
printf "%bDebug mode was active. The following files have not been deleted:%b\n" "$YELLOW_NORMAL" "$COLOR_RESET"
find "$debug_directory" -mindepth 1 2>/dev/null | while read -r matching_file; do
if [[ ! -s $matching_file ]]; then
command rm -f "$matching_file"
Expand Down

0 comments on commit 28627b5

Please sign in to comment.