Skip to content

Commit efac925

Browse files
Neethu-Mohandogi
andauthored
treehouses log refactor log_help_and_exit1 (fixes #1997) (#2000)
Co-authored-by: dogi <dogi@users.noreply.github.com>
1 parent 120fcd9 commit efac925

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

modules/log.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ function log_comment_and_exit1() {
5151

5252
function log_help_and_exit1() {
5353
logit "$1" "$3"
54-
"$2_help"
54+
if type -t $2_help >/dev/null; then
55+
"$2_help"
56+
else
57+
echo "Panic: help function not found"
58+
fi
5559
exit 1
5660
}
5761

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@treehouses/cli",
3-
"version": "1.25.1",
3+
"version": "1.25.2",
44
"remote": "4000",
55
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
66
"main": "cli.sh",

0 commit comments

Comments
 (0)