'Generic Commit'
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 43s
Build-Test-Publish / build (linux/arm64) (push) Successful in 57s

This commit is contained in:
Your Name 2025-06-22 13:19:07 +12:00
parent 7cf3d879d1
commit aaf9f4719d
2 changed files with 6 additions and 17 deletions

View File

@ -413,13 +413,10 @@ int update_tool(int argc, char* argv[]) {
for (const auto& [name, status, version] : updateResults) {
std::string displayStatus = status;
if (status == "Updated") {
displayStatus = "" + status;
updatedCount++;
} else if (status == "Up to date") {
displayStatus = "" + status;
upToDateCount++;
} else {
displayStatus = "" + status;
failedCount++;
}
@ -643,14 +640,14 @@ int list_packages(int argc, char* argv[]) {
std::string remoteHash;
if (getbin.getHash(packageName, arch, remoteHash) && !remoteHash.empty()) {
if (localHash == remoteHash) {
status = "Latest";
remoteStatus = "";
status = "Latest";
remoteStatus = "OK";
} else {
status = "Update";
remoteStatus = "";
status = "Update";
remoteStatus = "Update";
}
} else {
status = "Local";
status = "Local";
remoteStatus = "?";
}
}
@ -666,14 +663,6 @@ int list_packages(int argc, char* argv[]) {
// Print footer
std::cout << "+" << std::string(25, '-') << "+" << std::string(12, '-') << "+" << std::string(18, '-') << "+" << std::string(10, '-') << "+" << std::endl;
std::cout << std::endl;
// Print legend
std::cout << "Legend:" << std::endl;
std::cout << " Available - Package available for installation" << std::endl;
std::cout << " ✓ Latest - Installed and up to date" << std::endl;
std::cout << " ⚡ Update - Installed but update available" << std::endl;
std::cout << " ✓ Local - Installed (remote status unknown)" << std::endl;
std::cout << std::endl;
std::cout << "Total packages: " << availablePackages.size()
<< ", Installed: " << installedPackages.size() << std::endl;

View File

@ -544,7 +544,7 @@ fi
if [ -d ~/.config/getpkg ] && [ "$(find ~/.config/getpkg -name "*.json" -type f 2>/dev/null | wc -l)" -gt 0 ]; then
echo -e "\nTest 15: Update command"
UPDATE_ALL_OUTPUT=$(timeout 30 "$GETPKG" update 2>&1) || UPDATE_ALL_OUTPUT=""
if [[ "$UPDATE_ALL_OUTPUT" =~ Update\ complete ]]; then
if [[ "$UPDATE_ALL_OUTPUT" =~ Update\ Summary ]]; then
print_test_result "Update all tools command" 0
else
print_test_result "Update all tools command" 1