Skip to content

Commit 13fdc01

Browse files
committed
fix: Unload module before trying to delete it's files
1 parent 4ab9b34 commit 13fdc01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

_InitializeRepository.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ If you have made changes to any files you may want to commit them before continu
1212
[string] $organizationName = Read-Host -Prompt "Enter your name, or the the name of your organization (e.g. 'My Company'). This will be used in the module manifest and repository license"
1313

1414
Import-Module -Name $TemplateModuleDirectoryPath -Force
15+
1516
Remove-AllRepositoryFilesExceptTemplateModuleFiles
1617
New-PowerShellModuleRepository -RepositoryDirectoryPath $RepositoryDirectoryPath -ModuleName $moduleName -OrganizationName $organizationName
18+
19+
Remove-Module -Name Template.PowerShell.ScriptModule -Force
1720
Remove-TemplateModuleFiles
1821

1922
Write-Host -ForegroundColor Green "Repo initialization complete. You can now commit the changes to your repository."

0 commit comments

Comments
 (0)