From 887bc03f3240168c04199d575b973f2e69d66b6b Mon Sep 17 00:00:00 2001 From: Bill Ferguson Date: Fri, 2 Jul 2021 21:29:36 -0400 Subject: [PATCH] bug --- tools/script_manager.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/script_manager.lua b/tools/script_manager.lua index 1df213f..acba4a6 100644 --- a/tools/script_manager.lua +++ b/tools/script_manager.lua @@ -880,12 +880,9 @@ if sm.executables.git and clean and checkout_repo_branch(repo, "master") end end - elseif branches then - dt.print_log("branches has " .. #branches .. " branches") - if LUA_API_VER > branches[#branches] then - log.msg(log.info, "no newer branches, staying on master") - -- stay on master - end + elseif #branches >0 and LUA_API_VER > branches[#branches] then + log.msg(log.info, "no newer branches, staying on master") + -- stay on master else -- checkout the appropriate branch for API version if it exists log.msg(log.info, "checking out the appropriate API branch")