mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Fix adding Import-Module command to the profile in Install-PSPackage
This commit is contained in:
parent
ce2a129c36
commit
0cfde7beae
@ -166,10 +166,10 @@ Function Install-PSPackage() {
|
|||||||
Expand-Archive -Path $zip_file -DestinationPath $bin_dir -Force
|
Expand-Archive -Path $zip_file -DestinationPath $bin_dir -Force
|
||||||
}
|
}
|
||||||
Import-Module $module_path
|
Import-Module $module_path
|
||||||
Add-ToProfile $current_profile "$package-search" "Import-Module $module_path"
|
|
||||||
|
|
||||||
if($null -eq (Get-Command $cmdlet -ErrorAction SilentlyContinue)) {
|
if($null -eq (Get-Command $cmdlet -ErrorAction SilentlyContinue)) {
|
||||||
Install-Module -Name $package -Force
|
Install-Module -Name $package -Force
|
||||||
|
} else {
|
||||||
|
Add-ToProfile $current_profile "$package-search" "Import-Module $module_path"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user