Skip to content

Commit 5dffe3d

Browse files
committed
remove temp file generation for testing
1 parent 285ef5c commit 5dffe3d

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

Diff for: main.go

+23-24
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import (
3535
cors "github.com/andela/gin-cors"
3636
"github.com/arduino/arduino-create-agent/systray"
3737
"github.com/arduino/arduino-create-agent/tools"
38-
"github.com/arduino/arduino-create-agent/updater"
3938
"github.com/arduino/arduino-create-agent/utilities"
4039
v2 "github.com/arduino/arduino-create-agent/v2"
4140
"github.com/gin-gonic/gin"
@@ -140,29 +139,29 @@ func main() {
140139
AdditionalConfig: *additionalConfig,
141140
}
142141

143-
path, err := osext.Executable()
144-
if err != nil {
145-
panic(err)
146-
}
147-
148-
// If the executable is temporary, copy it to the full path, then restart
149-
if strings.Contains(path, "-temp") {
150-
newPath := updater.BinPath(path)
151-
err := copyExe(path, newPath)
152-
if err != nil {
153-
log.Println("Copy error: ", err)
154-
panic(err)
155-
}
156-
157-
Systray.Update(newPath)
158-
} else {
159-
// Otherwise copy to a path with -temp suffix
160-
err := copyExe(path, updater.TempPath(path))
161-
if err != nil {
162-
panic(err)
163-
}
164-
Systray.Start()
165-
}
142+
// path, err := osext.Executable()
143+
// if err != nil {
144+
// panic(err)
145+
// }
146+
147+
// // If the executable is temporary, copy it to the full path, then restart
148+
// if strings.Contains(path, "-temp") {
149+
// newPath := updater.BinPath(path)
150+
// err := copyExe(path, newPath)
151+
// if err != nil {
152+
// log.Println("Copy error: ", err)
153+
// panic(err)
154+
// }
155+
156+
// Systray.Update(newPath)
157+
// } else {
158+
// // Otherwise copy to a path with -temp suffix
159+
// err := copyExe(path, updater.TempPath(path))
160+
// if err != nil {
161+
// panic(err)
162+
// }
163+
// Systray.Start()
164+
// }
166165
}
167166

168167
func copyExe(from, to string) error {

0 commit comments

Comments
 (0)