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

Why did you add find user in resource collection code? #50

Closed
dougireton opened this issue Dec 1, 2015 · 3 comments
Closed

Why did you add find user in resource collection code? #50

dougireton opened this issue Dec 1, 2015 · 3 comments

Comments

@dougireton
Copy link
Contributor

@jtimberman I'm refactoring the code to find a user's home directory to add Windows support.

I see you specifically added support for looking up a user in the resource collection in the commits below. Can you explain the purpose of these additions? It seems like if the user and their home directory were created earlier during the Chef run, then they would already be available when vagrant_plugin needed them, or if new_resource.user is nil then it would never be found anyway.

I'm really wondering if we can cut out the support for finding the user in the Chef run resource_collection. It would make the code easier to maintain.

d018000#diff-38a4aeddb4e620724d3b85362cb8b939R66

d018000#diff-9dd581ae1baaef6ddac9d068f84b6639R65

@jtimberman
Copy link
Contributor

This commit is where that was introduced. At the time the recipe is evaluated to build the resource collection, the user doesn't exist. This is because it happens during load_current_resource, here.

@dougireton
Copy link
Contributor Author

OK, makes sense.

@lock
Copy link

lock bot commented Mar 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Mar 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants