Skip to content

Commit fc54b2f

Browse files
committed
switch from ~/appdata/local/scoop to ~/scoop for new installation
1 parent 0c0cf9b commit fc54b2f

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

lib/core.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
$scoopdir = $env:SCOOP, "$env:LOCALAPPDATA\scoop" | select -first 1
1+
# Note: The default directory changed from ~/AppData/Local/scoop to ~/scoop
2+
# on 1 Nov, 2016 to work around long paths used by NodeJS.
3+
# Old installations should continue to work using the old path.
4+
# There is currently no automatic migration path to deal
5+
# with updating old installations to the new path.
6+
$scoopdir = $env:SCOOP, "$env:USERPROFILE\scoop" | select -first 1
7+
8+
$oldscoopdir = "$env:LOCALAPPDATA\scoop"
9+
if((test-path $oldscoopdir) -and !$env:SCOOP) {
10+
$scoopdir = $oldscoopdir
11+
}
12+
213
$globaldir = $env:SCOOP_GLOBAL, "$($env:programdata.tolower())\scoop" | select -first 1
314
$cachedir = "$scoopdir\cache" # always local
415

0 commit comments

Comments
 (0)