@@ -227,15 +227,15 @@ func spProgramLocal(portname string, boardname string, filePath string, commandl
227227
228228 log .Printf ("Received commandline (unresolved):" + commandline )
229229
230- commandline = strings .Replace (commandline , "{build.path}" , filepath .ToSlash (filepath .Dir (filePath )), 1 )
231- commandline = strings .Replace (commandline , "{build.project_name}" , strings .TrimSuffix (filepath .Base (filePath ), filepath .Ext (filepath .Base (filePath ))), 1 )
232- commandline = strings .Replace (commandline , "{serial.port}" , portname , 1 )
233- commandline = strings .Replace (commandline , "{serial.port.file}" , filepath .Base (portname ), 1 )
230+ commandline = strings .Replace (commandline , "{build.path}" , filepath .ToSlash (filepath .Dir (filePath )), - 1 )
231+ commandline = strings .Replace (commandline , "{build.project_name}" , strings .TrimSuffix (filepath .Base (filePath ), filepath .Ext (filepath .Base (filePath ))), - 1 )
232+ commandline = strings .Replace (commandline , "{serial.port}" , portname , - 1 )
233+ commandline = strings .Replace (commandline , "{serial.port.file}" , filepath .Base (portname ), - 1 )
234234
235235 if extraInfo .Verbose == true {
236- commandline = strings .Replace (commandline , "{upload.verbose}" , extraInfo .ParamsVerbose , 1 )
236+ commandline = strings .Replace (commandline , "{upload.verbose}" , extraInfo .ParamsVerbose , - 1 )
237237 } else {
238- commandline = strings .Replace (commandline , "{upload.verbose}" , extraInfo .ParamsQuiet , 1 )
238+ commandline = strings .Replace (commandline , "{upload.verbose}" , extraInfo .ParamsQuiet , - 1 )
239239 }
240240
241241 // search for runtime variables and replace with values from globalToolsMap
0 commit comments