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

We need to support references in settings #3

Open
Jaykul opened this issue Oct 27, 2014 · 0 comments
Open

We need to support references in settings #3

Jaykul opened this issue Oct 27, 2014 · 0 comments

Comments

@Jaykul
Copy link
Member

Jaykul commented Oct 27, 2014

When I'm configuring complicated things, I may want to be able to define variables which I can reuse in other configurations. For instance, in a script which does software installs:

UserName = "Jaykul"
DownloadTo = "C:\Users\{UserName}\Downloads\Installers"
ConfigFolder = "{DownloadTo}\Configuration"

Currently we support tokenizing only for folder names. Maybe we could make it work for other settings by reference, like {Settings.UserName} by requiring them to be prefixed with Settings. and then resolving them after import (like paths in PoshCode) iterating to allow multiple reference levels:

UserName = "Jaykul"
Paths = @{
   DownloadTo = "C:\Users\{Settings.UserName}\Downloads\Installers"
   ConfigFolder = "{Settings.Paths.DownloadTo}\Configuration"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant