Open johlju opened 1 year ago
This is a bug on Linux and macOS. It works on Windows. So the command should probably fail if it can't parse configurations on a specifc OS.
The issue happens in Get-Psm1SchemaName
when calling $ast.FindAll
. The parser fails with this error:
System.IO.DirectoryNotFoundException: Unable to find DSC schema store at /etc/opt/omi/conf/dsc/configuration. Please ensure PS DSC for Linux is installed.
If seems to be a well known issue since quite a while: https://github.com/PowerShell/PowerShell/issues/10782.
Yes it seems that the build worker "ubuntu 20.04" in Azure Pipelines change so that in no longer can parse the configurations. Guessing probably because PS was updated. Quickest solution is to move build phase to run on vm image "windows-latest".
But I think we should catch and throw the parse error so it's clear why it fails to find a configuration statement š¤
Right, happy to take care of it.
@raandree great! I review as soon I see the PR is there. š
Problem description
Fails to build the module in the pipeline if there is a composite resource.
Verbose logs
How to reproduce
Run build on https://github.com/dsccommunity/ConfigMgrCBDsc with Sampler v0.116.1.
Fails on:
Expected behavior
Build without failing.
Current behavior
Throws exception
Suggested solution
Verify that the public command works as expected, and throw if there is an issue using it cross-platform.
Operating system the target node is running
PowerShell version and build the target node is running
Module version used