Prevent accessing an object multiple times at once
This commit is contained in:
parent
45327c3a5e
commit
a1bc1734c0
1 changed files with 3 additions and 1 deletions
|
@ -151,7 +151,9 @@ function Restore-PersonalApps([Context] $context) {
|
||||||
@($PROFILE, (powershell -c '$PROFILE')) | ForEach-Object {
|
@($PROFILE, (powershell -c '$PROFILE')) | ForEach-Object {
|
||||||
Get-Item "$(Split-Path -Parent $_)/profile.d/*Oh My Posh*";
|
Get-Item "$(Split-Path -Parent $_)/profile.d/*Oh My Posh*";
|
||||||
} | ForEach-Object {
|
} | ForEach-Object {
|
||||||
Get-Content $_ | ForEach-Object {
|
$oldContent = Get-Content $_;
|
||||||
|
|
||||||
|
$oldContent | ForEach-Object {
|
||||||
$indicator = "oh-my-posh init";
|
$indicator = "oh-my-posh init";
|
||||||
$_ -replace $indicator,"$indicator --config ~/Nextcloud/.omp/manuel.omp.json";
|
$_ -replace $indicator,"$indicator --config ~/Nextcloud/.omp/manuel.omp.json";
|
||||||
} | Set-Content $_;
|
} | Set-Content $_;
|
||||||
|
|
Loading…
Reference in a new issue