Force creation of profile files
This commit is contained in:
parent
5a4b5bf581
commit
00d349e162
1 changed files with 10 additions and 1 deletions
|
@ -46,7 +46,16 @@ class Context {
|
||||||
$profileFiles = $profileFiles | ForEach-Object { Join-Path (Split-Path -Parent $_) "profile.d" "$category.ps1"; };
|
$profileFiles = $profileFiles | ForEach-Object { Join-Path (Split-Path -Parent $_) "profile.d" "$category.ps1"; };
|
||||||
}
|
}
|
||||||
|
|
||||||
$profileFiles | ForEach-Object { Add-Content "C:\Users\Default\$_" "`n$statement"; };
|
$profileFiles | ForEach-Object {
|
||||||
|
$dirName = Split-Path -Parent $_;
|
||||||
|
|
||||||
|
if (-not (Test-Path -PathType Container $dirName)) {
|
||||||
|
New-Item -ItemType Directory $dirName;
|
||||||
|
}
|
||||||
|
|
||||||
|
Add-Content -Force "C:\Users\Default\$_" "`n$statement";
|
||||||
|
};
|
||||||
|
|
||||||
Pop-Location;
|
Pop-Location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue