blob: be7c15871cbc9c6d53e138fef3d358860601d46f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//go:build windows && !nonhost
package main
import (
"os/exec"
)
// Run the native WSL command
func command(distribution Distribution, config Config) (*exec.Cmd, error) {
// Append the additional arguments to the command
args := append([]string{"-d", distribution.Name}, config.WslArgs...)
// Set the title of the terminal window
err := exec.Command("cmd", "/c", "title", distribution.Name).Run()
if err != nil {
return nil, err
}
return exec.Command("wsl", args...), nil
}
|