github.com/mutagen-io/mutagen@v0.18.0-rc1/cmd/mutagen/project/common_posix.go (about)

     1  //go:build !windows
     2  
     3  package project
     4  
     5  import (
     6  	"os"
     7  	"os/exec"
     8  )
     9  
    10  // runInShell runs the specified command using the system shell. On POSIX
    11  // systems, this is /bin/sh.
    12  func runInShell(command string) error {
    13  	// Set up the process.
    14  	process := exec.Command("/bin/sh", "-c", command)
    15  	process.Stdin = os.Stdin
    16  	process.Stdout = os.Stdout
    17  	process.Stderr = os.Stderr
    18  
    19  	// Run the process and wait for its completion.
    20  	return process.Run()
    21  }