美文网首页
golang exec.Command错误no such fil

golang exec.Command错误no such fil

作者: 哆啦在这A梦在哪 | 来源:发表于2022-01-10 10:53 被阅读0次

参数一定要注意

If name contains no path separators, Command uses LookPath to resolve name to a complete path if possible. Otherwise it uses name directly as Path.

不要写整条命令!!!
不要写整条命令!!!
不要写整条命令!!!

重要的事情说三遍

解决办法
参数是命令的名字或路径,参数一定要挨个传入

相关文章

网友评论

      本文标题:golang exec.Command错误no such fil

      本文链接:https://www.haomeiwen.com/subject/hvgdoltx.html