Make module installation compatible with Linux

This commit is contained in:
Manuel Thalmann 2024-09-13 14:54:47 +02:00
parent a7e90165cd
commit 681366ff8c

View file

@ -248,13 +248,11 @@ $null = New-Module {
} }
if ($module[1]) { if ($module[1]) {
$parameters = @{ $parameters = @("-AllowPrerelease");
allowPrerelease = $true;
};
} }
if (-not (Test-PSModule $module[0])) { if (-not (Test-PSModule $module[0])) {
Install-Module -Scope AllUsers -AcceptLicense -Force -AllowClobber $module[0] @parameters; sudo pwsh -Command Install-Module -Scope AllUsers -AcceptLicense -Force -AllowClobber $module[0] @parameters;
Import-Module $module[0]; Import-Module $module[0];
} }
} }