Skip to content

Commit

Permalink
UX: Fix a capitalization issue in the submodule updater
Browse files Browse the repository at this point in the history
This doesn't look right. If the submodule name is case-sensitive, then it can't be selected by converting to lower-case.

It would be possible to look up the keys and ignore capitalization to find a match, but that seems a tad excessive.
  • Loading branch information
rdw-software committed Jan 7, 2025
1 parent 69ca177 commit 533fadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BuildTools/update-submodules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function SubmoduleUpdater:GetHelpText(submodules)
local indent = " "
local readableList = indent .. table.concat(sortedKeys, "\n" .. indent)

return "Valid submodule IDs:\n\n" .. readableList:lower()
return "Valid submodule IDs:\n\n" .. readableList
end

local gitmodulesFileContents = C_FileSystem.ReadFile(".gitmodules")
Expand All @@ -97,7 +97,7 @@ if not submoduleID then
os.exit(1)
end

local submoduleToUpdate = submodules[submoduleID] or submodules[submoduleID:lower()]
local submoduleToUpdate = submodules[submoduleID]
if not submoduleToUpdate then
printf(red("Cannot upgrade submodule %s (invalid submodule ID)\n"), submoduleID)
print(SubmoduleUpdater:GetHelpText(submodules))
Expand Down

0 comments on commit 533fadf

Please sign in to comment.