Minor tweaks for windows env

This commit is contained in:
GalSz (Varnois VDI) 2021-12-13 23:23:45 -05:00
parent 1c4e9feb1f
commit c5311de65a
3 changed files with 18 additions and 13 deletions

View file

@ -6,14 +6,9 @@ if( -not (Test-Path variable:global:ScoopRefreshed) ) {
$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.")
if($Host.Name -ne 'Visual Studio Code Host' ) {
scoop refresh
[SessionData]::Set("ScoopRefreshed",$true)
}
}