fix(shell/lean.cpp): print git commit in version string only when it's available
This commit is contained in:
parent
14472b20eb
commit
900c7c41a1
1 changed files with 5 additions and 3 deletions
|
@ -62,9 +62,11 @@ static void on_ctrl_c(int ) {
|
|||
}
|
||||
|
||||
static void display_header(std::ostream & out) {
|
||||
out << "Lean (version " << LEAN_VERSION_MAJOR << "." << LEAN_VERSION_MINOR
|
||||
<< ", commit " << std::string(g_githash).substr(0, 12)
|
||||
<< ", " << LEAN_STR(LEAN_BUILD_TYPE) << ")\n";
|
||||
out << "Lean (version " << LEAN_VERSION_MAJOR << "." << LEAN_VERSION_MINOR;
|
||||
if (!std::strcmp(g_githash, "GITDIR-NOTFOUND")) {
|
||||
out << ", commit " << std::string(g_githash).substr(0, 12);
|
||||
}
|
||||
out << ", " << LEAN_STR(LEAN_BUILD_TYPE) << ")\n";
|
||||
}
|
||||
|
||||
static void display_help(std::ostream & out) {
|
||||
|
|
Loading…
Reference in a new issue