-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add target-shell history #786
Conversation
Thanks for your contribution, we did want to have the history option inside target shell. We'll look at it later. Could you also attach this PR to an existing issue? That way we are better able to keep track of it. |
We mentioned #650 in the opening comment of this PR. Is that not sufficient? We will probably incorporate this into the |
Very nice! Do you think you could implement the feature as described in #650 with regards to templating too? I like these additions but it would be awesome if you could also add that part. For example, to keep with the naming scheme:
Or maybe a better name for |
the association for us is in the |
I do not think we have access to modify that attribute of a PR in GitHub. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #786 +/- ##
==========================================
+ Coverage 75.42% 75.45% +0.02%
==========================================
Files 296 296
Lines 25600 25629 +29
==========================================
+ Hits 19310 19339 +29
Misses 6290 6290
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The PyPy tests on Linux are struggling real hard, not sure if it's a CI problem or related to this PR. |
I think it's the PR 😉 maybe one of the shell changes, or the addition of looking for a config file in |
Can you see what test is hanging? What is the |
Should be |
The tests seem to be fine, I cannot reproduce this with
Running |
Unfortunately I can't reproduce this on Apple Silicon. |
What's interesting here is it seems that the windows pypy tests are unaffected, which might suggest this has to do with I've run
Edit: I've tried running |
Seems to be stuck at 98% now. What is the RAM/CPU size of the runners for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I somehow managed to get a reproducable case on my own system. I think the test got stuck in an infinite loop because of some sort of unhandled error (OSError on my system) when trying to read the history file, which would cause run_cli
to loop infinitely. The proposed changes moves the error handling directly to the reading and writing of the history files, which should fix the issue.
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Nice find! I wonder why those stacktraces were not showing up during testing. Perhaps because of the new |
|
This PR adds support for target-shell history files to dissect as described in #650.
Small changes were made to the config helper utility to also scan the current working directory for
.targetcfg.py
files. The storage location of the shell history by default is$HOME/.dissect_history
and can be changed with theHISTFILE
variable in.targetcfg.py
.