Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Improve New-VesterConfig $Desired RegEx #178

Open
brianbunke opened this issue Sep 18, 2017 · 1 comment · May be fixed by #191
Open

Improve New-VesterConfig $Desired RegEx #178

brianbunke opened this issue Sep 18, 2017 · 1 comment · May be fixed by #191
Assignees
Labels

Comments

@brianbunke
Copy link
Contributor

brianbunke commented Sep 18, 2017

Expected Behavior

New-VesterConfig successfully pulls the config value to populate from the $Desired line.

Current Behavior

The RegEx catches all instances of $cfg, instead of just the one desired. (Heyooo puns)

Possible Solution

Make dirty RegEx less dirty and more complicated

Be awesome and use the AST to properly parse the variable assignment

Steps to Reproduce (for bugs)

Try to run New-VesterConfig against the #176 version of the module, and watch it not populate a value for the new host VDS membership test. (Because "$cfg" is commented out in the fix block.)

Your Environment

#176

@brianbunke brianbunke added the bug label Sep 18, 2017
@brianbunke brianbunke self-assigned this Sep 18, 2017
@brianbunke
Copy link
Contributor Author

Have this working, it looks pretty sweet 😃 Will hopefully submit a PR today.

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

Successfully merging a pull request may close this issue.

1 participant