From 0e5319f45417834e290aec8418c155d697536709 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 131cd4e2..0c7c7e34 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; }