Adding error message letting the user know they need to install PSDSC for Linux
This commit is contained in:
parent
800382f019
commit
4656f3c072
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue