From 09dde98159b59b4feca4b1fcd3ab9cb94fded2a5 Mon Sep 17 00:00:00 2001 From: huntedbytheirs Date: Tue, 4 Aug 2026 14:05:16 -0400 Subject: [PATCH] fix: report package conflicts in resolve and rebuild handlers Conflicts were detected in the resolver but silently ignored in both the resolve and rebuild subcommands. Both now print conflict errors and abort before any builds start. --- src/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index e41e856..16b1cf9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -714,6 +714,14 @@ int main(int argc, char* argv[]) { return 1; } + if (!plan.conflicts.empty()) { + std::cerr << "error: package conflicts detected:\n"; + for (auto& c : plan.conflicts) { + std::cerr << " " << c << "\n"; + } + return 1; + } + std::cout << plan.steps.size() << " packages in build order:\n"; for (auto& step : plan.steps) { std::cout << " " << step.name << " (" << step.dependencies.size() @@ -781,6 +789,11 @@ int main(int argc, char* argv[]) { for (auto& c : plan.cycles) std::cerr << " " << c << "\n"; return 1; } + if (!plan.conflicts.empty()) { + std::cerr << "error: package conflicts detected:\n"; + for (auto& c : plan.conflicts) std::cerr << " " << c << "\n"; + return 1; + } if (plan.steps.empty()) { std::cout << "nothing to build\n"; return 0;