Skip to content

Commit

Permalink
Fix Linux version regex (#1852)
Browse files Browse the repository at this point in the history
Fix linux version regex
  • Loading branch information
kelszo authored Aug 10, 2022
1 parent 3c08b6c commit 121c348
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libmamba/src/core/util_os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ namespace mamba
return "";
}

std::regex re("([0-9]+\\.[0-9]+\\.[0-9]+)-.*");
std::regex re("([0-9]+\\.[0-9]+\\.[0-9]+)(?:-.*)?");
std::smatch m;

if (std::regex_search(out, m, re))
Expand All @@ -311,6 +311,8 @@ namespace mamba
}
}

LOG_DEBUG << "Could not parse linux version";

return "";
}

Expand Down

0 comments on commit 121c348

Please sign in to comment.