github.com/sohaha/zlsgo@v1.7.13-0.20240501141223-10dd1a906f76/zshell/shell_win.go (about)

     1  //go:build windows
     2  // +build windows
     3  
     4  package zshell
     5  
     6  import (
     7  	"context"
     8  	"errors"
     9  )
    10  
    11  func RunNewProcess(file string, args []string) (pid int, err error) {
    12  	return 0, errors.New("windows does not support")
    13  }
    14  
    15  func RunBash(ctx context.Context, command string) (code int, outStr, errStr string, err error) {
    16  	return ExecCommand(ctx, []string{
    17  		"cmd",
    18  		"/C",
    19  		command,
    20  	}, nil, nil, nil)
    21  }