Make OMP configuration platform independent

This commit is contained in:
Manuel Thalmann 2024-08-24 13:27:48 +02:00
parent 82192c3ff3
commit 26d683b4c5

View file

@ -34,7 +34,16 @@ Start-SoftwareInstaller @PSBoundParameters `
$root = "$($IsWindows ? $env:AppData : "~/.config")/oh-my-posh"; $root = "$($IsWindows ? $env:AppData : "~/.config")/oh-my-posh";
$path = Join-Path $root "$($theme.name).omp.json"; $path = Join-Path $root "$($theme.name).omp.json";
$null = New-Item -Force -ItemType Directory $root; $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; $theme = [string] $path;
} }