File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2022 Arduino SA
2+ //
3+ // This program is free software: you can redistribute it and/or modify
4+ // it under the terms of the GNU Affero General Public License as published
5+ // by the Free Software Foundation, either version 3 of the License, or
6+ // (at your option) any later version.
7+ //
8+ // This program is distributed in the hope that it will be useful,
9+ // but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ // GNU Affero General Public License for more details.
12+ //
13+ // You should have received a copy of the GNU Affero General Public License
14+ // along with this program. If not, see <https://www.gnu.org/licenses/>.
15+
16+ package systray
17+
18+ import "os/exec"
19+
20+ // default execApp from golang
21+ func execApp (path string , args ... string ) error {
22+ cmd := exec .Command (path , args ... )
23+ return cmd .Start ()
24+ }
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ package systray
1818import (
1919 "fmt"
2020 "os"
21- "os/exec"
2221 "strings"
2322
2423 "github.com/arduino/go-paths-helper"
@@ -69,8 +68,7 @@ func (s *Systray) Restart() {
6968 }
7069
7170 // Launch executable
72- cmd := exec .Command (s .path , args ... )
73- err := cmd .Start ()
71+ err := execApp (s .path , args ... )
7472 if err != nil {
7573 log .Printf ("Error restarting process: %v\n " , err )
7674 return
You can’t perform that action at this time.
0 commit comments