You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Validate PSModuleInfo properties directly instead of checking pwsh.HadErrors first
Changed validation logic to check Author, Description, and Version properties on the result object directly, rather than only checking them when pwsh.HadErrors is true. This ensures proper validation with CurrentRunspace mode.
Co-authored-by: adityapatwardhan <12820925+adityapatwardhan@users.noreply.github.com>
errorMsg="No author was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
errorMsg="No description was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
1415
-
}
1416
-
elseif(psModuleInfoObj.Version==null)
1417
-
{
1418
-
errorMsg="No version or an incorrectly formatted version was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
1419
-
}
1409
+
errorMsg="No author was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
errorMsg=$"Module manifest file validation failed with error: {innerErrorMsg}. Run 'Test-ModuleManifest' to validate the module manifest.";
1414
+
errorMsg="No description was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
1415
+
returnfalse;
1427
1416
}
1428
-
1417
+
elseif(psModuleInfoObj.Version==null)
1418
+
{
1419
+
errorMsg="No version or an incorrectly formatted version was provided in the module manifest. The module manifest must specify a version, author and description. Run 'Test-ModuleManifest' to validate the file.";
0 commit comments