Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Sep 25, 2023
1 parent 11e710e commit a4791e5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ func ParseArgs(command string) (params []string) {
params = append(params, string(item))
}
for k, v := range params {
v = envWin.ReplaceAllStringFunc(v, getWinEnv)
params[k] = envOS.ReplaceAllStringFunc(v, getEnv)
v = ParseWindowsEnvVar(v)
params[k] = ParseEnvVar(v)
}
//fmt.Printf("---> %#v\n", params)
//params = []string{}
Expand Down Expand Up @@ -199,14 +199,14 @@ type CmdResultCapturer struct {
Do func([]byte) error
}

func (this CmdResultCapturer) Write(p []byte) (n int, err error) {
err = this.Do(p)
func (c CmdResultCapturer) Write(p []byte) (n int, err error) {
err = c.Do(p)
n = len(p)
return
}

func (this CmdResultCapturer) WriteString(p string) (n int, err error) {
err = this.Do([]byte(p))
func (c CmdResultCapturer) WriteString(p string) (n int, err error) {
err = c.Do([]byte(p))
n = len(p)
return
}
Expand Down

0 comments on commit a4791e5

Please sign in to comment.