提交 5e2b168d 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

set script language interpreter

上级 cad15dde
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
"fmt" "fmt"
commonUtils "github.com/easysoft/zentaoatf/src/utils/common" commonUtils "github.com/easysoft/zentaoatf/src/utils/common"
"io" "io"
"os"
"os/exec" "os/exec"
"path" "path"
"strings" "strings"
...@@ -37,8 +38,7 @@ func ExecFile(filePath string) string { ...@@ -37,8 +38,7 @@ func ExecFile(filePath string) string {
cmd = exec.Command("cmd", "/C", filePath) cmd = exec.Command("cmd", "/C", filePath)
} else { } else {
exec.Command("/bin/bash", "-c", "chmod +x "+filePath) os.Chmod(filePath, 0777)
cmd = exec.Command("/bin/bash", "-c", filePath) cmd = exec.Command("/bin/bash", "-c", filePath)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册