From 26d683b4c5d7e67900d063d2dca0333e51082c9c Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 24 Aug 2024 13:27:48 +0200 Subject: [PATCH] Make OMP configuration platform independent --- scripts/Common/Software/Oh My Posh/Manage.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Software/Oh My Posh/Manage.ps1 b/scripts/Common/Software/Oh My Posh/Manage.ps1 index 54cfdc03..f3c06299 100644 --- a/scripts/Common/Software/Oh My Posh/Manage.ps1 +++ b/scripts/Common/Software/Oh My Posh/Manage.ps1 @@ -34,7 +34,16 @@ Start-SoftwareInstaller @PSBoundParameters ` $root = "$($IsWindows ? $env:AppData : "~/.config")/oh-my-posh"; $path = Join-Path $root "$($theme.name).omp.json"; $null = New-Item -Force -ItemType Directory $root; - Set-Content $path (wsl cat $theme.source); + + Set-Content $path ( + & { + if ($IsWindows) { + wsl cat $theme.source + } else { + cat $theme.source + } + }); + $theme = [string] $path; }