Skip to content

Commit

Permalink
teardown plugin, skip printing blank configure info
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jan 15, 2025
1 parent fd747aa commit ba8bd8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cosmotop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,14 @@ static void print_version() {

static void print_version_with_build_info() {
print_version();
fmt::println("Compiled with: {} ({})\nConfigured with: {}", COMPILER, COMPILER_VERSION, CONFIGURE_COMMAND);
fmt::println("Compiled with: {} ({})", COMPILER, COMPILER_VERSION);

if(!is_plugin_loaded()) {
try {
create_plugin_host();
string plugin_info = plugin_build_info();
fmt::println("{}", plugin_info);
shutdown_plugin();
} catch (const std::exception& e) {
fmt::println("Unable to load platform-specific plugin: {}", e.what());
}
Expand Down
2 changes: 1 addition & 1 deletion src/cosmotop_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void plugin_initializer(Plugin* plugin) {

plugin->registerHandler<string>("build_info", std::function([]() {
std::stringstream ss;
ss << "Host-native plugin compiled with: " << COMPILER << " (" << COMPILER_VERSION << ")\nConfigured with: " << CONFIGURE_COMMAND;
ss << "Host-native plugin compiled with: " << COMPILER << " (" << COMPILER_VERSION << ")";
return ss.str();
}));

Expand Down

0 comments on commit ba8bd8c

Please sign in to comment.