Skip to content

Commit 33c4356

Browse files
committed
execute post_install.bat if contained in downloaded tool
1 parent cbe8007 commit 33c4356

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/download.go

+11
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
"io/ioutil"
1515
"net/http"
1616
"os"
17+
"os/exec"
1718
"path"
1819
"path/filepath"
1920
"runtime"
@@ -331,6 +332,16 @@ func extractTarGz(body []byte, location string) (string, error) {
331332
return location, nil
332333
}
333334

335+
func installDrivers(location string) {
336+
if runtime.GOOS == "windows" {
337+
if _, err := os.Stat(filepath.Join(location, "post_install.bat")); err == nil {
338+
oscmd := exec.Command(filepath.Join(location, "post_install.bat"))
339+
TellCommandNotToSpawnShell(oscmd)
340+
oscmd.Run()
341+
}
342+
}
343+
}
344+
334345
func extractBz2(body []byte, location string) (string, error) {
335346
bodyCopy := make([]byte, len(body))
336347
copy(bodyCopy, body)

0 commit comments

Comments
 (0)