mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Merge pull request #1711 from PowerShell/johnkord-Linux_DSC_error_message
Error message for Linux DSC schema directory missing
This commit is contained in:
@@ -645,7 +645,10 @@ namespace Microsoft.PowerShell.DesiredStateConfiguration.Internal
|
||||
var dscConfigurationDirectory = Environment.GetEnvironmentVariable("DSC_HOME") ??
|
||||
"/etc/opt/omi/conf/dsc/configuration";
|
||||
|
||||
Debug.Assert(Directory.Exists(dscConfigurationDirectory), dscConfigurationDirectory + " does not exist.");
|
||||
if (!Directory.Exists(dscConfigurationDirectory))
|
||||
{
|
||||
throw new DirectoryNotFoundException("Unable to find DSC schema store at " + dscConfigurationDirectory + ". Please ensure PS DSC for Linux is installed.");
|
||||
}
|
||||
|
||||
var resourceBaseFile = Path.Combine(dscConfigurationDirectory, "baseregistration/baseresource.schema.mof");
|
||||
ImportClasses(resourceBaseFile, s_defaultModuleInfoForResource, errors);
|
||||
|
||||
Reference in New Issue
Block a user