Make module installation compatible with Linux
This commit is contained in:
parent
a7e90165cd
commit
681366ff8c
1 changed files with 2 additions and 4 deletions
|
@ -248,13 +248,11 @@ $null = New-Module {
|
|||
}
|
||||
|
||||
if ($module[1]) {
|
||||
$parameters = @{
|
||||
allowPrerelease = $true;
|
||||
};
|
||||
$parameters = @("-AllowPrerelease");
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue