File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -133,8 +133,10 @@ func (tr *ToolRelease) String() string {
133133// RuntimeProperties returns the runtime properties for this tool
134134func (tr * ToolRelease ) RuntimeProperties () * properties.Map {
135135 res := properties .NewMap ()
136- res .Set ("runtime.tools." + tr .Tool .Name + ".path" , tr .InstallDir .String ())
137- res .Set ("runtime.tools." + tr .Tool .Name + "-" + tr .Version .String ()+ ".path" , tr .InstallDir .String ())
136+ if tr .IsInstalled () {
137+ res .Set ("runtime.tools." + tr .Tool .Name + ".path" , tr .InstallDir .String ())
138+ res .Set ("runtime.tools." + tr .Tool .Name + "-" + tr .Version .String ()+ ".path" , tr .InstallDir .String ())
139+ }
138140 return res
139141}
140142
Original file line number Diff line number Diff line change @@ -193,7 +193,11 @@ func runProgramAction(pm *packagemanager.PackageManager,
193193 if requiredTools , err := pm .FindToolsRequiredForBoard (board ); err == nil {
194194 for _ , requiredTool := range requiredTools {
195195 logrus .WithField ("tool" , requiredTool ).Info ("Tool required for upload" )
196- uploadProperties .Merge (requiredTool .RuntimeProperties ())
196+ if requiredTool .IsInstalled () {
197+ uploadProperties .Merge (requiredTool .RuntimeProperties ())
198+ } else {
199+ errStream .Write ([]byte (fmt .Sprintf ("Warning: tool '%s' is not installed. It might not be available for your OS." , requiredTool )))
200+ }
197201 }
198202 }
199203
You can’t perform that action at this time.
0 commit comments