Skip to content

Commit fcb34fd

Browse files
committed
modify reference package_json and call post_install
1 parent 33c4356 commit fcb34fd

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var (
4646
address = flag.String("address", "127.0.0.1", "The address where to listen. Defaults to localhost")
4747
signatureKey = flag.String("signatureKey", "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvc0yZr1yUSen7qmE3cxF\nIE12rCksDnqR+Hp7o0nGi9123eCSFcJ7CkIRC8F+8JMhgI3zNqn4cUEn47I3RKD1\nZChPUCMiJCvbLbloxfdJrUi7gcSgUXrlKQStOKF5Iz7xv1M4XOP3JtjXLGo3EnJ1\npFgdWTOyoSrA8/w1rck4c/ISXZSinVAggPxmLwVEAAln6Itj6giIZHKvA2fL2o8z\nCeK057Lu8X6u2CG8tRWSQzVoKIQw/PKK6CNXCAy8vo4EkXudRutnEYHEJlPkVgPn\n2qP06GI+I+9zKE37iqj0k1/wFaCVXHXIvn06YrmjQw6I0dDj/60Wvi500FuRVpn9\ntwIDAQAB\n-----END PUBLIC KEY-----", "Pem-encoded public key to verify signed commandlines")
4848
Tools tools.Tools
49-
indexURL = flag.String("indexURL", "http://downloads.arduino.cc/packages/package_index.json", "The address from where to download the index json containing the location of upload tools")
49+
indexURL = flag.String("indexURL", "http://downloads.arduino.cc/packages/package_staging_index.json", "The address from where to download the index json containing the location of upload tools")
5050
)
5151

5252
type NullWriter int

tools/download.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ func (t *Tools) Download(name, version, behaviour string) error {
176176
return err
177177
}
178178

179+
t.installDrivers(location)
180+
179181
// Ensure that the files are executable
180182
t.Logger.Println("Ensure that the files are executable")
181183

@@ -332,9 +334,10 @@ func extractTarGz(body []byte, location string) (string, error) {
332334
return location, nil
333335
}
334336

335-
func installDrivers(location string) {
337+
func (t *Tools) installDrivers(location string) {
336338
if runtime.GOOS == "windows" {
337339
if _, err := os.Stat(filepath.Join(location, "post_install.bat")); err == nil {
340+
t.Logger.Println("Installing drivers")
338341
oscmd := exec.Command(filepath.Join(location, "post_install.bat"))
339342
TellCommandNotToSpawnShell(oscmd)
340343
oscmd.Run()

0 commit comments

Comments
 (0)