Skip to content
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

Fix loading profile files when executing multiple profiles #2223

Merged
merged 1 commit into from
Oct 6, 2017

Conversation

adamleff
Copy link
Contributor

@adamleff adamleff commented Oct 6, 2017

When running inspec exec with multiple profiles, such as:

inspec exec profile1 profile2

... profile1 control calls to inspec.profile.file will incorrectly try to pull files from profile2 because the RuntimeProfile object is stored on the backend object, and we share the backend object.

This change ensures each profile has a unique backend object to ensure the RuntimeProfile instance is not overwritten.

Fixes #2004

When running `inspec exec` with multiple profiles, such as:

inspec exec profile1 profile2

... profile1 control calls to `inspec.profile.file` will incorrectly
try to pull files from profile2 because the RuntimeProfile object
is stored on the backend object, and we share the backend object.

This change ensures each profile has a unique backend object to ensure
the RuntimeProfile instance is not overwritten.

Signed-off-by: Adam Leff <adam@leff.co>
@adamleff adamleff requested a review from a team as a code owner October 6, 2017 17:29
@adamleff adamleff added in progress Type: Bug Feature not working as expected labels Oct 6, 2017
Copy link
Contributor

@arlimus arlimus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing fix, thank you Adam!!

@arlimus arlimus merged commit a54bc98 into master Oct 6, 2017
@arlimus arlimus deleted the adamleff/runtimeprofile-override branch October 6, 2017 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Feature not working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants