File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ func main() {
140140 // Parse regular flags
141141 flag .Parse ()
142142
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+
143155 // Generate certificates
144156 if * genCert {
145157 generateCertificates ()
@@ -201,18 +213,6 @@ func loop() {
201213 log .SetLevel (log .InfoLevel )
202214 log .SetOutput (os .Stdout )
203215
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-
216216 // Let's handle the config
217217 var configPath * paths.Path
218218
You can’t perform that action at this time.
0 commit comments