Handle scoop completion gracefully
This commit is contained in:
parent
cb09d8bb11
commit
f61e0768d2
@ -1,3 +1,11 @@
|
|||||||
|
if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) {
|
||||||
|
$ScoopCompletion = "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
|
||||||
|
if (!(Test-Path $ScoopCompletion)) {
|
||||||
|
scoop bucket add extras
|
||||||
|
scoop install scoop-completion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(Test-Path -PathType Container $env:LOCALAPPDATA\layouts)) {
|
if (!(Test-Path -PathType Container $env:LOCALAPPDATA\layouts)) {
|
||||||
New-Item -ItemType Directory -Path $env:LOCALAPPDATA\layouts
|
New-Item -ItemType Directory -Path $env:LOCALAPPDATA\layouts
|
||||||
Write-Output "changed: created directory $env:LOCALAPPDATA\layouts"
|
Write-Output "changed: created directory $env:LOCALAPPDATA\layouts"
|
||||||
|
@ -8,7 +8,10 @@ $GitPromptSettings.BeforeStatus = ""
|
|||||||
$GitPromptSettings.AfterStatus = ""
|
$GitPromptSettings.AfterStatus = ""
|
||||||
# Enable Scoop completions.
|
# Enable Scoop completions.
|
||||||
if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) {
|
if (Get-Command scoop.ps1 -ErrorAction SilentlyContinue) {
|
||||||
Import-Module "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
|
$ScoopCompletion = "$($(Get-Item $(Get-Command scoop.ps1).Path).Directory.Parent.FullName)\modules\scoop-completion"
|
||||||
|
if (Test-Path $ScoopCompletion) {
|
||||||
|
Import-Module $ScoopCompletion
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# Enable Chocolatey completions.
|
# Enable Chocolatey completions.
|
||||||
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user