diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-10-18 14:07:53 -0500 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-10-18 14:08:24 -0500 |
commit | e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc (patch) | |
tree | eff37b3aa48182cde75e996d9ecfe2db7b1b2932 /run_host.go | |
download | wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar.gz wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar.bz2 wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar.lz wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar.xz wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.tar.zst wsl-tui-e2e4f70f6b14d46d7dbbd2e0d5e7c3c3c69b47cc.zip |
Initial commit
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'run_host.go')
-rw-r--r-- | run_host.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/run_host.go b/run_host.go new file mode 100644 index 0000000..4a74a7b --- /dev/null +++ b/run_host.go @@ -0,0 +1,14 @@ +//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...) + return exec.Command("wsl", args...), nil +} |