Skip to content

Commit

Permalink
fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Dec 17, 2023
1 parent fc4e964 commit 30c2d79
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/libutil/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static bool printUnknownLocations = getEnv("_NIX_EVAL_SHOW_UNKNOWN_LOCATIONS").h

class PosOutput {
std::ostream & output;
const std::shared_ptr<AbstractPos> lastPos;
std::shared_ptr<AbstractPos> lastPos;

public:
PosOutput(std::ostream & o) : output(o) { }
Expand All @@ -191,10 +191,13 @@ class PosOutput {
printCodeLines(output, "", *pos, *loc);
output << "\n";
}
} else if (printUnknownLocations) {
output << "\n" << indent << ANSI_BLUE << "at " ANSI_RED << "UNKNOWN LOCATION" << ANSI_NORMAL << "\n";
*lastPos = *pos;
} else {
lastPos.reset();
if (printUnknownLocations) {
output << "\n" << indent << ANSI_BLUE << "at " ANSI_RED << "UNKNOWN LOCATION" << ANSI_NORMAL << "\n";
}
}
*lastPos = *pos;
return hasPos;
}
};
Expand Down

0 comments on commit 30c2d79

Please sign in to comment.