Skip to content

Commit

Permalink
Merge pull request #638 from eth-brownie/fix-run-interactive
Browse files Browse the repository at this point in the history
Enter correct frame with run --interactive
  • Loading branch information
iamdefinitelyahuman committed Jun 19, 2020
2 parents a98d441 + 536670a commit 980e574
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion brownie/_cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def main():

if args["--interactive"]:
frame = next(
(i.frame for i in inspect.trace() if Path(i.filename).as_posix() == path_str), None
(i.frame for i in inspect.trace()[::-1] if Path(i.filename).as_posix() == path_str),
None,
)
if frame is not None:
globals_dict = {k: v for k, v in frame.f_globals.items() if not k.startswith("__")}
Expand Down

0 comments on commit 980e574

Please sign in to comment.