Fix adding Import-Module command to the profile in Install-PSPackage
This commit is contained in:
parent
ce2a129c36
commit
0cfde7beae
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue