Closed matrixx567 closed 7 months ago
thx
I forgot to see the test result... it failed. @matrixx567 Could you take a look?
@knqyf263 It seems that there is a problem with different operating systems.
On my Windows machine all tests passes. The SysProcAttr.CmdLine
will only be available on Windows.
I'm not so experienced in Go and I don't know how to handle these code lines only on the Windows system. Can you help me with that?
SysProcAttr
doesn't have a CmdLine
field in Linux.
https://github.com/golang/go/blob/f719d5cffdb8298eff7a5ef533fe95290e8c869c/src/syscall/exec_linux.go#L62-L108
We need to write different codes for different platforms with build constraints. https://github.com/golang/go/blob/f719d5cffdb8298eff7a5ef533fe95290e8c869c/src/syscall/exec_linux.go#L5
Issue
138
Description of changes:
Commands with quotes can't be handled on windows using standard exec.Command() calls. Based on the go documentation https://pkg.go.dev/os/exec#Command the argument handling is converted to SysProcAttr.