Ensure WSL Ubuntu is installed
This commit is contained in:
parent
ed6585161e
commit
1fa55e9578
|
@ -78,9 +78,13 @@ $null = New-Module {
|
|||
Restart-Intermediate;
|
||||
return;
|
||||
}
|
||||
|
||||
if (-not (wsl --shell-type login type -t nix)) {
|
||||
|
||||
if (-not (& { $null = wsl -l; $?; })) {
|
||||
ubuntu install --root;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (-not (wsl --shell-type login type -t nix)) {
|
||||
wsl -- sh `<`(curl -L https://nixos.org/nix/install`) --daemon --yes;
|
||||
wsl --shutdown;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue