Skip to content

Commit

Permalink
fix(buckets): Move extras bucket (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash258 authored Oct 26, 2021
1 parent ba3b9e1 commit 97d1b67
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
16 changes: 8 additions & 8 deletions buckets.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"Base": "https://github.com/shovel-org/Base",
"main": "https://github.com/ScoopInstaller/Main",
"extras": "https://github.com/lukesampson/scoop-extras",
"versions": "https://github.com/ScoopInstaller/Versions",
"nerd-fonts": "https://github.com/matthewjberger/scoop-nerd-fonts",
"extras": "https://github.com/ScoopInstaller/Extras",
"java": "https://github.com/ScoopInstaller/Java",
"php": "https://github.com/ScoopInstaller/PHP",
"games": "https://github.com/Calinou/scoop-games",
"nightlies": "https://github.com/ScoopInstaller/Nightlies",
"nerd-fonts": "https://github.com/matthewjberger/scoop-nerd-fonts",
"nirsoft": "https://github.com/Ash258/Scoop-NirSoft",
"nonportable": "https://github.com/TheRandomLabs/scoop-nonportable",
"jetbrains": "https://github.com/Ash258/Scoop-JetBrains",
"sysinternals": "https://github.com/Ash258/Scoop-SysInternals"
"sysinternals": "https://github.com/Ash258/Scoop-SysInternals",
"nonportable": "https://github.com/TheRandomLabs/scoop-nonportable",
"games": "https://github.com/Calinou/scoop-games",
"php": "https://github.com/ScoopInstaller/PHP",
"versions": "https://github.com/ScoopInstaller/Versions",
"nightlies": "https://github.com/ScoopInstaller/Nightlies"
}
18 changes: 17 additions & 1 deletion lib/Diagnostic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Test-DiagWindowsDefender {
return $true
}

function Test-DiagMainBucketAdded {
function Test-DiagBucket {
<#
.SYNOPSIS
Test if main bucket was added after migration from core repository.
Expand All @@ -88,6 +88,8 @@ function Test-DiagMainBucketAdded {
$verdict = $true
$all = Get-LocalBucket

# Base, main added
# TODO: Drop main in near future for security reasons
'main', 'Base' | ForEach-Object {
if ($all -notcontains $_) {
Write-UserMessage -Message "'$_' bucket is not added" -Warning
Expand All @@ -100,6 +102,20 @@ function Test-DiagMainBucketAdded {
}
}

# Extras changed
if ($all -contains 'extras') {
$path = Find-BucketDirectory -Name 'extras' -Root

if ((Invoke-GitCmd -Repository $path -Command 'remote' -Argument 'get-url', 'origin') -match 'lukesampson') {
Write-UserMessage -Message "'extras' bucket was moved" -Warning
Write-UserMessage -Message @(
' Fixable with running following command:'
" scoop bucket rm 'extras'; scoop bucket add 'extras'"
)
$verdict = $false
}
}

return $verdict
}

Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-checkup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if ($_err) { Stop-ScoopExecution -Message "scoop checkup: $_err" -ExitCode 2 }

$Problems += !(Test-DiagWindowsDefender)
$Problems += !(Test-DiagWindowsDefender -Global)
$Problems += !(Test-DiagMainBucketAdded)
$Problems += !(Test-DiagBucket)
$Problems += !(Test-DiagLongPathEnabled)
$Problems += !(Test-DiagEnvironmentVariable)
$Problems += !(Test-DiagHelpersInstalled)
Expand Down

0 comments on commit 97d1b67

Please sign in to comment.