Skip to content

Commit ab4de46

Browse files
Remove Add-PSModulePath and Remove-PSModule functions to simplify module management
1 parent d682b93 commit ab4de46

File tree

5 files changed

+1
-78
lines changed

5 files changed

+1
-78
lines changed

scripts/helpers/Add-PSModulePath.ps1

Lines changed: 0 additions & 29 deletions
This file was deleted.

scripts/helpers/Build-PSModuleDocumentation.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
Write-Host "Docs output folder: [$docsOutputFolder]"
4646

4747
Write-Host '::group::Build docs - Generate markdown help'
48-
Add-PSModulePath -Path (Split-Path -Path $ModuleOutputFolder -Parent)
4948
Import-PSModule -Path $ModuleOutputFolder
5049
Write-Host ($ModuleName | Get-Module)
5150
$null = New-MarkdownHelp -Module $ModuleName -OutputFolder $DocsOutputFolder -Force -Verbose

scripts/helpers/Import-PSModule.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626
$manifestFilePath = Join-Path -Path $Path "$moduleName.psd1"
2727

2828
Write-Host " - Manifest file path: [$manifestFilePath]"
29-
Remove-PSModule -Name $moduleName
3029
Resolve-PSModuleDependency -ManifestFilePath $manifestFilePath
3130

3231
Write-Host ' - List installed modules'
3332
Get-InstalledPSResource | Format-Table -AutoSize
3433

3534
Write-Host " - Importing module [$moduleName] v999"
36-
Import-Module -Name $moduleName -RequiredVersion '999.0.0'
35+
Import-Module $Path
3736

3837
Write-Host ' - List loaded modules'
3938
$availableModules = Get-Module -ListAvailable -Refresh -Verbose:$false

scripts/helpers/Remove-PSModule.ps1

Lines changed: 0 additions & 44 deletions
This file was deleted.

scripts/helpers/Resolve-PSModuleDependency.ps1

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949

5050
$VerbosePreferenceOriginal = $VerbosePreference
5151
$VerbosePreference = 'SilentlyContinue'
52-
Write-Host " - [$($installParams.Name)] - Uninstalling module"
53-
Remove-PSModule -Name $installParams.Name
5452
Write-Host " - [$($installParams.Name)] - Installing module"
5553
$Count = 5
5654
$Delay = 10

0 commit comments

Comments
 (0)