Install PowerShell modules after removing old copy
This commit is contained in:
parent
1452bd3f1e
commit
e85504e40e
|
@ -54,16 +54,16 @@ $null = New-Module {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-Hook "Install-PSModules" -Fallback {
|
|
||||||
Install-Module -AcceptLicense -Force PSWindowsUpdate;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Test-Path $env:PWSH_PATH) {
|
if (Test-Path $env:PWSH_PATH) {
|
||||||
attrib "-R" "$env:PWSH_PATH\*" /S /D;
|
attrib "-R" "$env:PWSH_PATH\*" /S /D;
|
||||||
Remove-Item -Recurse -Force $env:PWSH_PATH;
|
Remove-Item -Recurse -Force $env:PWSH_PATH;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Invoke-Hook "Install-PSModules" -Fallback {
|
||||||
|
Install-Module -AcceptLicense -Force PSWindowsUpdate;
|
||||||
|
};
|
||||||
|
|
||||||
if (-not (Test-Command winget)) {
|
if (-not (Test-Command winget)) {
|
||||||
. "$PSScriptRoot/../Software/winget/Manage.ps1";
|
. "$PSScriptRoot/../Software/winget/Manage.ps1";
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue