Skip to content

Commit e4b4a9b

Browse files
committed
🐛 fix: fixed typos and paths
1 parent 8370fc2 commit e4b4a9b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotposh/Modules/Set-DevDriveEnvironments.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ function Move-CacheContents {
9797
)
9898
if (Test-Path -PathType Container -Path $ContentPath) {
9999
Move-Item -Path "$ContentPath\*" -Destination "$Destination" -Force
100-
Remove-Item -Path $ContentPath -Recurse -Force -ErrorAction SilentlyContinue
101100
if ($LASTEXITCODE -eq 0) {
102101
Write-Success -Entry1 "Contents" -Entry2 "$ContentPath ==> $Destination" -Text "moved."
103102
}
104103
else {
105104
Write-Error -Entry1 "Contents" -Entry2 "$ContentPath ==> $Destination" -Text "failed to moved."
106105
}
106+
Remove-Item -Path $ContentPath -Recurse -Force -ErrorAction SilentlyContinue
107107
}
108108
else {
109109
Write-Error -Entry1 "Contents" -Entry2 "$ContentPath ==> $Destination" -Text "already moved / no content to move."
@@ -117,7 +117,7 @@ function Set-DevDriveEnvironments {
117117
@{ Command = "npm"; Value = "npm_config_cache"; ValuePath = "$packagePath\npm"; SourcePaths = @("$env:APPDATA\npm-cache". "$env:LOCALAPPDATA\npm-cache") },
118118
@{ Command = "yarn"; Value = "YARN_CACHE_FOLDER"; ValuePath = "$packagePath\npm"; SourcePaths = @("$env:LOCALAPPDATA\Yarn\Cache") },
119119
@{ 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") },
121121
@{ Command = "pipx"; Value = "PIPX_HOME"; ValuePath = "$packagePath\pipx"; SourcePaths = @("$env:USERPROFILE\pipx") },
122122
@{ Command = "cargo"; Value = "CARGO_HOME"; ValuePath = "$packagePath\cargo"; SourcePaths = @("$env:USERPROFILE\.cargo") },
123123
@{ Command = "rustup"; Value = "RUSTUP_HOME"; ValuePath = "$packagePath\rustup"; SourcePaths = @("$env:USERPROFILE\.rustup") },
@@ -132,7 +132,7 @@ function Set-DevDriveEnvironments {
132132
$command = $setting.Command
133133
$name = $setting.Value
134134
$value = $setting.ValuePath
135-
$sources = $setting.Paths
135+
$sources = $setting.SourcePaths
136136

137137
if (Get-Command $command -ErrorAction SilentlyContinue) {
138138
# Create a directory if it doesn't exist

0 commit comments

Comments
 (0)