Skip to content

Commit 6633209

Browse files
dolauligeorgendGeorge Ndungu
authored
Fix ArgumentNullException when Generating without docs -NoDocs switch (#711) (#712)
* Fix ArgumentNullException when Generating without docs `-NoDocs` features. Pass along `-ExamplesFolder` since its required in all code paths. * Make examples mandatory, for all paramsets Co-authored-by: George Ndungu <[email protected]> Co-authored-by: George <[email protected]> Co-authored-by: George Ndungu <[email protected]>
1 parent bd7146a commit 6633209

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

powershell/resources/assets/build-module.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
122122

123123
if($NoDocs) {
124124
Write-Host -ForegroundColor Green 'Creating exports...'
125-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
125+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
126126
} else {
127127
Write-Host -ForegroundColor Green 'Creating exports and docs...'
128128
$moduleDescription = '${$project.metadata.description}'

powershell/resources/psruntime/BuildTime/Cmdlets/ExportProxyCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class ExportProxyCmdlet : PSCmdlet
4242
[ValidateNotNullOrEmpty]
4343
public string DocsFolder { get; set; }
4444

45-
[Parameter(Mandatory = true, ParameterSetName = "Docs")]
45+
[Parameter(Mandatory = true)]
4646
[ValidateNotNullOrEmpty]
4747
public string ExamplesFolder { get; set; }
4848

0 commit comments

Comments
 (0)