Make module installation compatible with Linux
This commit is contained in:
parent
a7e90165cd
commit
681366ff8c
|
@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue