Skip to content

Commit

Permalink
Fix: exec file path error
Browse files Browse the repository at this point in the history
  • Loading branch information
YuMao233 committed Nov 20, 2022
1 parent 4389387 commit 56514c3
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions console/console_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ func (c *console) buildCmd(args []string) (string, error) {
return "", ErrInvalidCmd
}
var cmds = fmt.Sprintf("cmd /C chcp %s > nul & ", codePage(c.coder))
if file, err := exec.LookPath(args[0]); err != nil {
return "", err
} else if args[0], err = filepath.Abs(file); err != nil {
return "", err
}
for _, v := range args {
cmds += v + ` `
}
Expand Down

0 comments on commit 56514c3

Please sign in to comment.