fix line reading in preBuildHook
This commit is contained in:
parent
1fc0fe1baf
commit
6a8cee19b3
1 changed files with 1 additions and 1 deletions
|
@ -2059,7 +2059,7 @@ void DerivationGoal::startBuilder()
|
||||||
auto lastPos = std::string::size_type{0};
|
auto lastPos = std::string::size_type{0};
|
||||||
for (auto nlPos = lines.find('\n'); nlPos != string::npos;
|
for (auto nlPos = lines.find('\n'); nlPos != string::npos;
|
||||||
nlPos = lines.find('\n', lastPos)) {
|
nlPos = lines.find('\n', lastPos)) {
|
||||||
auto line = std::string{lines, lastPos, nlPos};
|
auto line = std::string{lines, lastPos, nlPos - lastPos};
|
||||||
lastPos = nlPos + 1;
|
lastPos = nlPos + 1;
|
||||||
if (state == stBegin) {
|
if (state == stBegin) {
|
||||||
if (line == "extra-chroot-dirs") {
|
if (line == "extra-chroot-dirs") {
|
||||||
|
|
Loading…
Reference in a new issue