Skip to content

Commit

Permalink
Fix ArgumentNullException when Generating without docs -NoDocs swit…
Browse files Browse the repository at this point in the history
…ch (#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 <gendungu@microsoft.com>

Co-authored-by: George <1641829+finsharp@users.noreply.github.com>
Co-authored-by: George Ndungu <gendungu@microsoft.com>
  • Loading branch information
3 people authored Nov 23, 2020
1 parent bd7146a commit 6633209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion powershell/resources/assets/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder

if($NoDocs) {
Write-Host -ForegroundColor Green 'Creating exports...'
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
} else {
Write-Host -ForegroundColor Green 'Creating exports and docs...'
$moduleDescription = '${$project.metadata.description}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ExportProxyCmdlet : PSCmdlet
[ValidateNotNullOrEmpty]
public string DocsFolder { get; set; }

[Parameter(Mandatory = true, ParameterSetName = "Docs")]
[Parameter(Mandatory = true)]
[ValidateNotNullOrEmpty]
public string ExamplesFolder { get; set; }

Expand Down

0 comments on commit 6633209

Please sign in to comment.