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

Install-Lab doesn't use default dsclibrary #335

Closed
DennisL68 opened this issue Oct 30, 2019 · 2 comments · Fixed by #341
Closed

Install-Lab doesn't use default dsclibrary #335

DennisL68 opened this issue Oct 30, 2019 · 2 comments · Fixed by #341
Assignees
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.

Comments

@DennisL68
Copy link

DennisL68 commented Oct 30, 2019

PowerShell v5.1
PowerShell Console as Administrator
Windows 10 Pro (b18362)
LabBuilder v1.0.4.84

When using a labbuilder config from a custom location, Install-Lab assumes that DSCLibrary is present one level up from the configured labpath.

New-LabException : The DSC Config file 'C:\Users\Public\Labs\.\..\DSCLibrary\DC_FORESTPRIMARY.DSC.ps1' specified in VM
'PoSH-Auto DC' could not be found.
At C:\Program Files\WindowsPowerShell\Modules\LabBuilder\1.0.4.84\LabBuilder.psm1:7179 char:21
+                     New-LabException @exceptionParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-LabException], Exception
    + FullyQualifiedErrorId : DSCConfigFileMissingError,New-LabException

This is easaly adjustable by setting dsclibrarypath.
But shouldn't the dsclibrary of the module always be used, at least by default (or as a fallback)?

The fallback path can always be found using different techniques
split-path (get-module labbuilder).path

@PlagueHO PlagueHO added the bug The issue is a bug. label Nov 8, 2019
@PlagueHO
Copy link
Owner

PlagueHO commented Nov 9, 2019

Great idea @DennisL68 - I'm implementing this now.

@PlagueHO PlagueHO self-assigned this Nov 9, 2019
@PlagueHO PlagueHO added the in progress The issue is being actively worked on by someone. label Nov 9, 2019
@PlagueHO
Copy link
Owner

PlagueHO commented Nov 9, 2019

This will also allow me to remove the dsclibrary path from all the samples.

PlagueHO added a commit that referenced this issue Nov 9, 2019
PlagueHO added a commit that referenced this issue Nov 9, 2019
Change dsclibrarypath setting to default to Module Folder when missing - Fixes #335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. in progress The issue is being actively worked on by someone.
Projects
None yet
2 participants