File tree 2 files changed +9
-3
lines changed
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 {
133
133
// RuntimeProperties returns the runtime properties for this tool
134
134
func (tr * ToolRelease ) RuntimeProperties () * properties.Map {
135
135
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
+ }
138
140
return res
139
141
}
140
142
Original file line number Diff line number Diff line change @@ -193,7 +193,11 @@ func runProgramAction(pm *packagemanager.PackageManager,
193
193
if requiredTools , err := pm .FindToolsRequiredForBoard (board ); err == nil {
194
194
for _ , requiredTool := range requiredTools {
195
195
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
+ }
197
201
}
198
202
}
199
203
You can’t perform that action at this time.
0 commit comments