Skip to content

Commit

Permalink
Support Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hymkor committed Oct 16, 2021
1 parent ffbfff8 commit 8f8efe1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions system_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//go:build !windows
// +build !windows

package main

import (
"os"
)

func System(cmdline string) (*os.Process, error) {
shell := os.Getenv("SHELL")
return os.StartProcess(
shell,
[]string{shell, "-c", cmdline},
&os.ProcAttr{
Files: []*os.File{os.Stdin, os.Stdout, os.Stderr},
})
}
File renamed without changes.

0 comments on commit 8f8efe1

Please sign in to comment.