-
-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code location from previous command failure is sometimes retained #2129
Comments
Ah OK, I think this is because we have a I will look at this, thank you! |
OK I repro'd this ... looking into it |
OK I narrowed the bug down to this code: https://github.com/oils-for-unix/oils/blob/master/core/state.py#L1370
But that's wrong here Because the one for statements is more recent So there are probably 2 fixes
this is a very good bug, thanks for the report! |
This is issue #2129 - Reset self.loc_for_expr on every line - the expression location is supposed to refine the line location - Pass location info in Stringify(), so we don't need to use the fallback location
I just fixed this, and improved the error location too.
Thanks for the report! |
In this example, calling
p
initially shows the expected code location in theecho
error, but after callingecho
erroneously at the top-level, the code location from the last failed top-level execution is displayed thereafter when callingp
.The text was updated successfully, but these errors were encountered: