-
Notifications
You must be signed in to change notification settings - Fork 43
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
Conditional include based on OS #171
Comments
can you not change the WSL hostname? |
Only if I'm willing to sacrifice automatic /etc/hosts generation, which is not a particularly good idea. |
ah I see. I agree that it would be good if handlebars could be used everywhere. |
This is not very possible to do, at least not with the way things are implemented right now, since the Handlebars engine is only created once we have gathered and mostly finalized all the configuration (exception made for the The workaround I can think of right now is:
I could see it being a feature to have
But that's very incompatible with how configuration is loaded currently (included files are imported and merged into one big context before Handlebars is initialized) Feel free to reopen if you have further question :) |
Environment
If applicable, provide the following details:
The question
Since I have the same hostname on Windows and WSL, I'm trying to work out how to conditionally include the windows.toml only when running in Windows. This would be the first step in having it only install the Windows Terminal configuration files when run from Windows and ignore it when from any WSL2 distro.
I've tried using the following in the hostname toml file, and it didn't work, as it doesn't seem to like templating at that level. Any suggestions?
The text was updated successfully, but these errors were encountered: