File tree 2 files changed +25
-3
lines changed
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
18
18
import (
19
19
"fmt"
20
20
"os"
21
- "os/exec"
22
21
"strings"
23
22
24
23
"github.com/arduino/go-paths-helper"
@@ -69,8 +68,7 @@ func (s *Systray) Restart() {
69
68
}
70
69
71
70
// Launch executable
72
- cmd := exec .Command (s .path , args ... )
73
- err := cmd .Start ()
71
+ err := execApp (s .path , args ... )
74
72
if err != nil {
75
73
log .Printf ("Error restarting process: %v\n " , err )
76
74
return
You can’t perform that action at this time.
0 commit comments