Skip to content

Commit 682a605

Browse files
author
Jacob Hrbek
committed
w_debug: New message handling for development
i'm using this locally to diagnose my contributions and i believe that using this in winetricks would be beneficial Signed-off-by: Jacob Hrbek <kreyren@rixotstudio.cz>
1 parent 0f30931 commit 682a605

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/winetricks

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,15 @@ w_warn()
262262
unset _W_timeout
263263
}
264264

265+
# Output debug message to stdin if debug variable is non-zero
266+
w_debug()
267+
{
268+
local w_message="$1"
269+
270+
# shellcheck disable=SC2154
271+
[ -n "$W_DEBUG" ] && printf 'DEBUG: %s\n' "$w_message"
272+
}
273+
265274
# Display warning message to stderr (since it is called inside redirected code)
266275
# And give gui user option to cancel (for when used in a loop)
267276
# If user cancels, exit status is 1

0 commit comments

Comments
 (0)