@@ -97,13 +97,13 @@ function Move-CacheContents {
97
97
)
98
98
if (Test-Path - PathType Container - Path $ContentPath ) {
99
99
Move-Item - Path " $ContentPath \*" - Destination " $Destination " - Force
100
- Remove-Item - Path $ContentPath - Recurse - Force - ErrorAction SilentlyContinue
101
100
if ($LASTEXITCODE -eq 0 ) {
102
101
Write-Success - Entry1 " Contents" - Entry2 " $ContentPath ==> $Destination " - Text " moved."
103
102
}
104
103
else {
105
104
Write-Error - Entry1 " Contents" - Entry2 " $ContentPath ==> $Destination " - Text " failed to moved."
106
105
}
106
+ Remove-Item - Path $ContentPath - Recurse - Force - ErrorAction SilentlyContinue
107
107
}
108
108
else {
109
109
Write-Error - Entry1 " Contents" - Entry2 " $ContentPath ==> $Destination " - Text " already moved / no content to move."
@@ -117,7 +117,7 @@ function Set-DevDriveEnvironments {
117
117
@ { Command = " npm" ; Value = " npm_config_cache" ; ValuePath = " $packagePath \npm" ; SourcePaths = @ (" $env: APPDATA \npm-cache" . " $env: LOCALAPPDATA \npm-cache" ) },
118
118
@ { Command = " yarn" ; Value = " YARN_CACHE_FOLDER" ; ValuePath = " $packagePath \npm" ; SourcePaths = @ (" $env: LOCALAPPDATA \Yarn\Cache" ) },
119
119
@ { Command = " pnpm" ; Value = " PNPM_HOME" ; ValuePath = " $packagePath \pnpm" ; SourcePaths = @ (" $env: LOCALAPPDATA \pnpm\store" ) },
120
- @ { Command = " pip" ; Value = " PIP_CACHE_DIR" ; ValuePath = " $packagePath \pip" ; SourcePaths = @ (" $env: LOCALAPPDATA \pip\Cache " ) },
120
+ @ { Command = " pip" ; Value = " PIP_CACHE_DIR" ; ValuePath = " $packagePath \pip" ; SourcePaths = @ (" $env: LOCALAPPDATA \pip\cache " ) },
121
121
@ { Command = " pipx" ; Value = " PIPX_HOME" ; ValuePath = " $packagePath \pipx" ; SourcePaths = @ (" $env: USERPROFILE \pipx" ) },
122
122
@ { Command = " cargo" ; Value = " CARGO_HOME" ; ValuePath = " $packagePath \cargo" ; SourcePaths = @ (" $env: USERPROFILE \.cargo" ) },
123
123
@ { Command = " rustup" ; Value = " RUSTUP_HOME" ; ValuePath = " $packagePath \rustup" ; SourcePaths = @ (" $env: USERPROFILE \.rustup" ) },
@@ -132,7 +132,7 @@ function Set-DevDriveEnvironments {
132
132
$command = $setting.Command
133
133
$name = $setting.Value
134
134
$value = $setting.ValuePath
135
- $sources = $setting.Paths
135
+ $sources = $setting.SourcePaths
136
136
137
137
if (Get-Command $command - ErrorAction SilentlyContinue) {
138
138
# Create a directory if it doesn't exist
0 commit comments