mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +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
|
||||
}
|
||||
Import-Module $module_path
|
||||
Add-ToProfile $current_profile "$package-search" "Import-Module $module_path"
|
||||
|
||||
if($null -eq (Get-Command $cmdlet -ErrorAction SilentlyContinue)) {
|
||||
Install-Module -Name $package -Force
|
||||
} else {
|
||||
Add-ToProfile $current_profile "$package-search" "Import-Module $module_path"
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user