From 9a3eb7bc3ec1cd2fa141e91f56c0d1b46294f17f Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Mon, 5 Jul 2021 15:13:56 -0400 Subject: [PATCH] [script_manager] added check for nil current branch and dumped repo_data --- tools/script_manager.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/script_manager.lua b/tools/script_manager.lua index cf76414..d2e2367 100644 --- a/tools/script_manager.lua +++ b/tools/script_manager.lua @@ -210,7 +210,11 @@ end local function get_current_repo_branch(repo_data) local branch = nil branch = string.match(repo_data, "On branch (.-)\n") - log.msg(log.info, "\ncurrent repo branch is " .. branch) + if not branch then + log.msg(log.error, "no branch detected in repo_data\nrepo_data:\n" .. repo_data) + else + log.msg(log.info, "\ncurrent repo branch is " .. branch) + end return branch end