Skip to content

Commit

Permalink
fixed long extensions name in status (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsManjeet committed Aug 4, 2024
1 parent 856e395 commit d4c68a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elements/components/sysroot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id: sysroot
version: 2.0.7
version: 2.0.8
about: Package Management and Updater Daemon
merge: [ elements/include/rlxos.inc ]

Expand Down
8 changes: 7 additions & 1 deletion src/sysroot/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,15 @@ struct SysrootApp : Application {
std::cout << " " << BOLD("ROLLING") << " : "
<< GREEN("TRUE") << std::endl;
}
size_t spacing = 10;
for (auto const& extension : deployment.extensions) {
if (extension.first.size() > spacing) {
spacing = extension.first.size() + 5;
}
}
for (auto const& extension : deployment.extensions) {
std::cout << " - " << BOLD(extension.first)
<< std::string(10 - extension.first.length(), ' ')
<< std::string(spacing - extension.first.length(), ' ')
<< " : " << BOLD(truncate(extension.second))
<< std::endl;
}
Expand Down

0 comments on commit d4c68a6

Please sign in to comment.