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

Inconsistent {{.Home}} and {{.User}} values between guest and host templates #2517

Open
jandubois opened this issue Jul 26, 2024 · 0 comments

Comments

@jandubois
Copy link
Member

In the host templates {{.Home}} is the host home directory, and in the guest templates it is the guest home directory.

But {{.User}} is always the host user, and not the guest user, which a guest template will have to construct via {{.User}}.linux.

I think the guest templates should have additional variables both for the guest user, and for the host home directory.

I don't have a good suggestion how to deal with naming that doesn't require changing the definition of {{.User}} in the guest templates, which I don't want to do because it breaks compatibility.

What do people think about this:

Variable Host Guest
.User jan jan
.Home /Users/jan /home/jan.linux
.Guest.User jan.linux jan.linux
.Guest.Home /home/jan.linux /home/jan.linux
.Host.User jan jan
.Host.Home /Users/jan /Users/jan

I think the {{.Guest.*}} settings are probably never going to be used in host templates, but it doesn't hurt to include them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant