We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bf558d commit fc49266Copy full SHA for fc49266
main.go
@@ -444,9 +444,15 @@ func loop() {
444
}()
445
}
446
447
-// oldInstallExixts will return true if an old installation of the agent exixts (on macos)
+// oldInstallExists will return true if an old installation of the agent exists (on macos) and is not the process running
448
func oldInstallExists() bool {
449
oldAgentPath := config.GetDefaultHomeDir().Join("Applications", "ArduinoCreateAgent")
450
+ currentBinary, _ := os.Executable()
451
+ // if the current running binary is the old one we don't need to do anything
452
+ binIsOld, _ := paths.New(currentBinary).IsInsideDir(oldAgentPath)
453
+ if binIsOld {
454
+ return false
455
+ }
456
return oldAgentPath.Exist()
457
458
0 commit comments