2021-06-29 13:43:27 +00:00
|
|
|
param([switch]$Force)
|
|
|
|
|
2021-06-29 19:06:01 +00:00
|
|
|
if( -not (Test-Path variable:global:ScoopRefreshed) ) {
|
|
|
|
scoop autocomplete-on
|
2021-06-29 13:43:27 +00:00
|
|
|
}
|
2021-06-29 19:06:01 +00:00
|
|
|
$global:ScoopRefreshed = [SessionData]::Get("ScoopRefreshed",$false)
|
2021-06-29 13:43:27 +00:00
|
|
|
|
2021-06-29 19:06:01 +00:00
|
|
|
if( -not $ScoopRefreshed ) {
|
|
|
|
if( Test-Path (Join-Path $env:SCOOP last-scoop-refresh.clixml) ) {
|
|
|
|
if($Host.Name -ne 'Visual Studio Code Host' ) {
|
|
|
|
scoop refresh
|
|
|
|
[SessionData]::Set("ScoopRefreshed",$true)
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
Write-Warning ("No recorded time for last 'scoop refresh', to remedy, run 'scoop refresh' at least once manually." +
|
|
|
|
"`nIf the issue still persists, please run 'scoop alias-update' to update to latest refresh code, and try again.")
|
2021-04-20 23:43:17 +00:00
|
|
|
}
|
2021-06-29 19:06:01 +00:00
|
|
|
}
|
|
|
|
|