Make config script platform independent
This commit is contained in:
parent
31eb506bc8
commit
5f6d8839f4
|
@ -76,11 +76,16 @@ $null = New-Module {
|
||||||
|
|
||||||
$scriptPath = "$PSScriptRoot/../../Common/Scripts/config.fish";
|
$scriptPath = "$PSScriptRoot/../../Common/Scripts/config.fish";
|
||||||
|
|
||||||
function fish {
|
if (-not $IsWindows) {
|
||||||
wsl --shell-type login -- nix --extra-experimental-features "nix-command flakes" run nixpkgs`#fish -- $args
|
$escapedPath = (fish -c 'string escape $argv' "$scriptPath");
|
||||||
}
|
fish -c ". $escapedPath; $Script";
|
||||||
|
} else {
|
||||||
|
function fish {
|
||||||
|
wsl --shell-type login -- nix --extra-experimental-features "nix-command flakes" run nixpkgs`#fish -- $args
|
||||||
|
}
|
||||||
|
|
||||||
fish -c ". $(ConvertTo-LinuxPath $scriptPath); $Script" | ConvertFrom-Json;
|
fish -c ". $(ConvertTo-LinuxPath $scriptPath); $Script" | ConvertFrom-Json;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
|
|
Loading…
Reference in a new issue