aboutsummaryrefslogtreecommitdiffstats
path: root/run_host.go
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-10-18 14:07:53 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-10-18 14:08:24 -0500
commit30031bc0ee46d28244f35505339d9d9789012561 (patch)
treee8288e18f804c53e589da0ceaefbbf20afae1c86 /run_host.go
downloadwsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar.gz
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar.bz2
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar.lz
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar.xz
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.tar.zst
wsl-tui-30031bc0ee46d28244f35505339d9d9789012561.zip
Initial commit
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'run_host.go')
-rw-r--r--run_host.go14
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
+}