Skip to content

Commit ada5abf

Browse files
Paweł Andruszkiewiczrennox
Paweł Andruszkiewicz
authored andcommitted
Fix polyglot error parsing on Windows
Change-Id: I04051b62e1d2e4010156f6a4f83047f48fa63826
1 parent 9dffec1 commit ada5abf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mysqlshdk/scripting/polyglot/utils/polyglot_error.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ std::vector<std::string> filter_backtrace(const std::string &backtrace,
9696
std::vector<std::string> lines;
9797
std::istringstream stream(backtrace);
9898
for (std::string line; std::getline(stream, line);) {
99+
#ifdef _WIN32
100+
if (!line.empty() && '\r' == line.back()) {
101+
line.pop_back();
102+
}
103+
#endif // _WIN32
104+
99105
lines.push_back(std::move(line));
100106
}
101107

0 commit comments

Comments
 (0)