-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
parseCommand Some command parsing and processing exceptions under Windows #3370
Comments
如果是windows系统的话,是否可以在process.NewProcess的函数里面添加一个判断,在初始化process后面,直接使用原生的参数不经过处理 process.SysProcAttr = &syscall.SysProcAttr{}
process.SysProcAttr.CmdLine = path + " " + gstr.Join(args, " ") |
If it is a windows system, is it possible to add a judgment in the function of process.NewProcess? After initializing the process, use the native parameters directly without processing. process.SysProcAttr = &syscall.SysProcAttr{}
process.SysProcAttr.CmdLine = path + " " + gstr.Join(args, " ")
|
需要把parseCmd函数处理下,直接返回cmd即可 |
You need to process the parseCmd function and return cmd directly. |
v2.6.4 gf build用到以下功能
例如在Windows下使用gproc.ShellExec(ctx, cmd)
执行命令
git log -1 --format="%cd %H" --date=format:"%Y-%m-%d %H:%M:%S"
时--format="%cd %H"
参数会被切割开导致报错
gf/os/gproc/gproc_shell.go
Line 66 in 1793bf0
The text was updated successfully, but these errors were encountered: