Fix installation of chocolatey profile
This commit is contained in:
parent
67a90200df
commit
a736000796
1 changed files with 8 additions and 1 deletions
|
@ -8,7 +8,14 @@ Push-Location ~;
|
||||||
$files = @((powershell -c '$PROFILE'), $PROFILE) | ForEach-Object { Resolve-Path -Relative $_ };
|
$files = @((powershell -c '$PROFILE'), $PROFILE) | ForEach-Object { Resolve-Path -Relative $_ };
|
||||||
|
|
||||||
foreach ($profileFile in $files) {
|
foreach ($profileFile in $files) {
|
||||||
Copy-Item -Force "~/$profileFile" "C:/Users/Default/$profileFile";
|
$fullName = "C:/Users/Default/$profileFile";
|
||||||
|
$dirName = Split-Path -Parent $fullName;
|
||||||
|
|
||||||
|
if (-not (Test-Path -PathType Container $dirName)) {
|
||||||
|
New-Item -Force -ItemType Directory $dirName;
|
||||||
|
}
|
||||||
|
|
||||||
|
Copy-Item -Force "~/$profileFile" $fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pop-Location;
|
Pop-Location;
|
||||||
|
|
Loading…
Reference in a new issue