File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ func main() {
140
140
// Parse regular flags
141
141
flag .Parse ()
142
142
143
+ // Instantiate Tools, so that .arduino-create/ folder gets created
144
+ Tools = tools.Tools {
145
+ Directory : agentDir .String (),
146
+ IndexURL : * indexURL ,
147
+ Logger : func (msg string ) {
148
+ mapD := map [string ]string {"DownloadStatus" : "Pending" , "Msg" : msg }
149
+ mapB , _ := json .Marshal (mapD )
150
+ h .broadcastSys <- mapB
151
+ },
152
+ }
153
+ Tools .Init (requiredToolsAPILevel )
154
+
143
155
// Generate certificates
144
156
if * genCert {
145
157
generateCertificates ()
@@ -201,18 +213,6 @@ func loop() {
201
213
log .SetLevel (log .InfoLevel )
202
214
log .SetOutput (os .Stdout )
203
215
204
- // Instantiate Tools
205
- Tools = tools.Tools {
206
- Directory : agentDir .String (),
207
- IndexURL : * indexURL ,
208
- Logger : func (msg string ) {
209
- mapD := map [string ]string {"DownloadStatus" : "Pending" , "Msg" : msg }
210
- mapB , _ := json .Marshal (mapD )
211
- h .broadcastSys <- mapB
212
- },
213
- }
214
- Tools .Init (requiredToolsAPILevel )
215
-
216
216
// Let's handle the config
217
217
var configPath * paths.Path
218
218
You can’t perform that action at this time.
0 commit comments