1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 03:09:35 +01:00

Merge commit '6636202356' into progress-bar

This commit is contained in:
John Ericson 2023-03-11 17:04:22 -05:00
commit 5109b5e467
81 changed files with 870 additions and 590 deletions

View file

@ -359,7 +359,7 @@ namespace nix {
// constructing without access violation.
ErrPos ep(invalid);
// assignment without access violation.
ep = invalid;

View file

@ -1263,9 +1263,9 @@ std::string chomp(std::string_view s)
std::string trim(std::string_view s, std::string_view whitespace)
{
auto i = s.find_first_not_of(whitespace);
if (i == std::string_view::npos) return "";
if (i == s.npos) return "";
auto j = s.find_last_not_of(whitespace);
return std::string(s, i, j == std::string::npos ? j : j - i + 1);
return std::string(s, i, j == s.npos ? j : j - i + 1);
}
@ -1412,7 +1412,7 @@ std::string filterANSIEscapes(const std::string & s, bool filterAll, unsigned in
}
}
else if (*i == '\r')
else if (*i == '\r' || *i == '\a')
// do nothing for now
i++;