Skip to content

Commit

Permalink
print git version only if not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
embetrix committed Dec 26, 2024
1 parent 9dc360c commit 3b6b878
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bmap-writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ int main(int argc, const char *argv[]) {
device = argv[2];
}

std::cout << "Starting bmap-writer ("<< GIT_VERSION <<")..." << std::endl;
if (std::strlen(GIT_VERSION) > 0) {
std::cout << "Starting bmap-writer (" << GIT_VERSION << ")..." << std::endl;
} else {
std::cout << "Starting bmap-writer..." << std::endl;
}

if (isDeviceMounted(device)) {
std::cerr << "Error device: " << device << " is mounted. Please unmount it before proceeding." << std::endl;
return 1;
Expand Down

0 comments on commit 3b6b878

Please sign in to comment.