Make OMP configuration platform independent

This commit is contained in:
Manuel Thalmann 2024-08-24 13:27:48 +02:00
parent f52d730a96
commit 963dcdc826

View file

@ -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;
}