20 lines
694 B
PowerShell
20 lines
694 B
PowerShell
param([switch]$Force)
|
|
|
|
if( -not (Test-Path variable:global:ScoopRefreshed) ) {
|
|
scoop autocomplete-on
|
|
}
|
|
$global:ScoopRefreshed = [SessionData]::Get("ScoopRefreshed",$false)
|
|
|
|
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.")
|
|
}
|
|
}
|
|
|