Skip to content

Commit 7e3dc73

Browse files
authored
refactor(core): Cleanup some old codes, e.g., msi section and config migration (#5715)
1 parent 48f7935 commit 7e3dc73

File tree

6 files changed

+187
-304
lines changed

6 files changed

+187
-304
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252

5353
- **git:** Use Invoke-Git() with direct path to git.exe to prevent spawning shim subprocesses ([#5122](https://github.com/ScoopInstaller/Scoop/issues/5122), [#5375](https://github.com/ScoopInstaller/Scoop/issues/5375))
5454
- **scoop-download:** Output more detailed manifest information ([#5277](https://github.com/ScoopInstaller/Scoop/issues/5277))
55+
- **core:** Cleanup some old codes, e.g., msi section and config migration ([#5715](https://github.com/ScoopInstaller/Scoop/issues/5715))
5556

5657
### Builds
5758

lib/core.ps1

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,31 +1415,6 @@ if ($pathExpected) {
14151415
}
14161416
$scoopConfig = load_cfg $configFile
14171417

1418-
# NOTE Scoop config file migration. Remove this after 2023/6/30
1419-
if ($scoopConfig -and $scoopConfig.PSObject.Properties.Name -contains 'lastUpdate') {
1420-
$newConfigNames = @{
1421-
'lastUpdate' = 'last_update'
1422-
'SCOOP_REPO' = 'scoop_repo'
1423-
'SCOOP_BRANCH' = 'scoop_branch'
1424-
'7ZIPEXTRACT_USE_EXTERNAL' = 'use_external_7zip'
1425-
'MSIEXTRACT_USE_LESSMSI' = 'use_lessmsi'
1426-
'NO_JUNCTIONS' = 'no_junction'
1427-
'manifest_review' = 'show_manifest'
1428-
'rootPath' = 'root_path'
1429-
'globalPath' = 'global_path'
1430-
'cachePath' = 'cache_path'
1431-
}
1432-
$newConfigNames.GetEnumerator() | ForEach-Object {
1433-
if ($null -ne $scoopConfig.$($_.Key)) {
1434-
$value = $scoopConfig.$($_.Key)
1435-
$scoopConfig.PSObject.Properties.Remove($_.Key)
1436-
$scoopConfig | Add-Member -MemberType NoteProperty -Name $_.Value -Value $value
1437-
}
1438-
}
1439-
ConvertTo-Json $scoopConfig | Out-UTF8File -FilePath $configFile
1440-
}
1441-
# END NOTE
1442-
14431418
# Scoop root directory
14441419
$scoopdir = $env:SCOOP, (get_config ROOT_PATH), (Resolve-Path "$PSScriptRoot\..\..\..\.."), "$([System.Environment]::GetFolderPath('UserProfile'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
14451420

0 commit comments

Comments
 (0)