Skip to content

Commit 0c214f1

Browse files
committed
Add tip_line() to Ui.hpp and improve registry publish feedback in PublishCommand
1 parent 72563ff commit 0c214f1

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

include/vix/cli/util/Ui.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ namespace vix::cli::util
5959
os << " " << YELLOW << "!" << RESET << " " << msg << "\n";
6060
}
6161

62+
inline void tip_line(std::ostream &os, std::string_view msg)
63+
{
64+
os << " "
65+
<< CYAN << "tip:" << RESET
66+
<< " "
67+
<< BOLD << msg << RESET
68+
<< "\n";
69+
}
6270
inline void err_line(std::ostream &os, std::string_view msg)
6371
{
6472
os << " " << RED << "" << RESET << " " << msg << "\n";

src/commands/PublishCommand.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,8 +1183,12 @@ namespace vix::commands
11831183
if (r.exitCode != 0)
11841184
{
11851185
vix::cli::util::err_line(std::cerr, "failed to update local registry repo (pull --ff-only)");
1186+
11861187
if (!r.err.empty())
11871188
vix::cli::util::warn_line(std::cerr, r.err);
1189+
1190+
vix::cli::util::tip_line(std::cerr, "Run 'vix registry sync' to reset the local registry.");
1191+
11881192
return r.exitCode;
11891193
}
11901194
}

0 commit comments

Comments
 (0)