Skip to content

Commit

Permalink
Remove $false in get_config()
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven committed Mar 27, 2024
1 parent f11a90a commit d5bde56
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/manifest.ps1
Expand Up @@ -140,7 +140,7 @@ function generate_user_manifest($app, $bucket, $version) {
ensure (usermanifestsdir) | Out-Null
$manifest_path = fullpath "$(usermanifestsdir)\$app.json"

if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
$cached_manifest = (Get-ScoopDBItem -Name $app -Bucket $bucket -Version $version).manifest
if ($cached_manifest) {
$cached_manifest | Out-UTF8File $manifest_path
Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-download.ps1
Expand Up @@ -24,7 +24,7 @@
. "$PSScriptRoot\..\lib\autoupdate.ps1" # 'generate_user_manifest' (indirectly)
. "$PSScriptRoot\..\lib\manifest.ps1" # 'generate_user_manifest' 'Get-Manifest'
. "$PSScriptRoot\..\lib\install.ps1"
if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
. "$PSScriptRoot\..\lib\database.ps1"
}

Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-install.ps1
Expand Up @@ -31,7 +31,7 @@
. "$PSScriptRoot\..\lib\psmodules.ps1"
. "$PSScriptRoot\..\lib\versions.ps1"
. "$PSScriptRoot\..\lib\depends.ps1"
if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
. "$PSScriptRoot\..\lib\database.ps1"
}

Expand Down
2 changes: 1 addition & 1 deletion libexec/scoop-search.ps1
Expand Up @@ -169,7 +169,7 @@ function search_remotes($query) {
$remote_list
}

if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
. "$PSScriptRoot\..\lib\database.ps1"
Select-ScoopDBItem $query -From @('name', 'binary', 'shortcut') |
Select-Object -Property name, version, bucket, binary |
Expand Down
8 changes: 4 additions & 4 deletions libexec/scoop-update.ps1
Expand Up @@ -23,7 +23,7 @@
. "$PSScriptRoot\..\lib\versions.ps1"
. "$PSScriptRoot\..\lib\depends.ps1"
. "$PSScriptRoot\..\lib\install.ps1"
if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
. "$PSScriptRoot\..\lib\database.ps1"
}

Expand Down Expand Up @@ -194,7 +194,7 @@ function Sync-Bucket {
if ($using:Log) {
Invoke-GitLog -Path $bucketLoc -Name $name -CommitHash $previousCommit
}
if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
Invoke-Git -Path $bucketLoc -ArgumentList @('diff', '--name-only', "$previousCommit..HEAD") | Where-Object {
$_ -match '^[^.].*\.json$'
} | ForEach-Object {
Expand All @@ -212,7 +212,7 @@ function Sync-Bucket {
if ($Log) {
Invoke-GitLog -Path $bucketLoc -Name $name -CommitHash $previousCommit
}
if (get_config USE_SQLITE_CACHE $false) {
if (get_config USE_SQLITE_CACHE) {
Invoke-Git -Path $bucketLoc -ArgumentList @('diff', '--name-only', "$previousCommit..HEAD") | Where-Object {
$_ -match '^[^.].*\.json$'
} | ForEach-Object {
Expand All @@ -221,7 +221,7 @@ function Sync-Bucket {
}
}
}
if ((get_config USE_SQLITE_CACHE $false) -and ($updatedFiles.Count -gt 0)) {
if ((get_config USE_SQLITE_CACHE) -and ($updatedFiles.Count -gt 0)) {
info 'Updating cache...'
Set-ScoopDB -Path $updatedFiles
}
Expand Down

0 comments on commit d5bde56

Please sign in to comment.