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
bugfix: fix rare inspec shell missing all resources #582
Conversation
7f6b0c8
to
768b724
Compare
In some instances, when running inspec shell, you dont get any resources inside of it. i.e. `inspec shell` and then `os` will lead to ```ruby NameError: undefined local variable or method `os' for from (pry):1:in `add_content' ``` This is because of instance_eval loading withing the given source/line information and not attaching to the profile context which actually has all the resources. Fix it by making sure that inspec shell always attaches to the profile context with resources by providing nil for source and line information.
768b724
to
3c3d711
Compare
Awesom fix for a bug I couldn't even reproduce! @aaronlippold @kdshah1 that takes care of the bug we saw 2 days ago 👍 |
Awesome! Thank you all! Which version of inspec has the bug fix? |
Give me a second to release it :) |
no rush. Take your time.:-) |
It is now available in the 0.16.4 release 🎊 |
Thanks! will check it out soon. |
|
cool! |
@kdshah1 awesome!! btw: try running it on a system which actually has auditd configured; if the rules cannot be read, let's tackle it in a separate issue :) |
In some instances, when running inspec shell, you don't get any resources inside of it. i.e.
inspec shell
and thenos
will lead toThis is because of instance_eval loading withing the given source/line
information and not attaching to the profile context which actually has
all the resources. Fix it by making sure that inspec shell always
attaches to the profile context with resources by providing nil for
source and line information.