Skip to content

Commit

Permalink
Fix tasks skipping if PlatyPS is not available (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju authored Jun 3, 2024
1 parent 9fee86b commit 89fb1ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- `Generate_Markdown_For_Public_Commands.build`
- Now the task will skip if PlatyPS is not available.
`Generate_External_Help_File_For_Public_Commands`
- Now the task will skip if PlatyPS is not available.

## [0.12.3] - 2024-06-01

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ param
Task Generate_External_Help_File_For_Public_Commands {
if (-not (Get-Module -Name 'PlatyPS' -ListAvailable))
{
throw 'PlatyPS is not installed. Please make sure it is available in a path that is listed in $PSModulePath. It can be added to the configuration file RequiredModules.psd1 in the project.'
Write-Warning -Message 'PlatyPS is not installed. Skipping. If public command documentation should be created please make sure PlatyPS is available in a path that is listed in $PSModulePath. It can be added to the configuration file RequiredModules.psd1 in the project.'

return
}

# Get the values for task variables, see https://github.com/gaelcolas/Sampler#task-variables.
Expand Down
4 changes: 3 additions & 1 deletion source/tasks/Generate_Markdown_For_Public_Commands.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ param
Task Generate_Markdown_For_Public_Commands {
if (-not (Get-Module -Name 'PlatyPS' -ListAvailable))
{
throw 'PlatyPS is not installed. Please make sure it is available in a path that is listed in $PSModulePath. It can be added to the configuration file RequiredModules.psd1 in the project.'
Write-Warning -Message 'PlatyPS is not installed. Skipping. If public command documentation should be created please make sure PlatyPS is available in a path that is listed in $PSModulePath. It can be added to the configuration file RequiredModules.psd1 in the project.'

return
}

# Get the values for task variables, see https://github.com/gaelcolas/Sampler#task-variables.
Expand Down

0 comments on commit 89fb1ea

Please sign in to comment.