Skip to content

Commit

Permalink
Fix: Do not report a parsing error if just the scan isn't complete
Browse files Browse the repository at this point in the history
Parsing errors where improperly reported in several situations. For
example when starting the extension, before any scan has happened yet.

This can lead to cases where 0 recipes have been scanned but it is
properly reported, and clicking the bar will trigger a rescan.
  • Loading branch information
deribaucourt committed Nov 23, 2023
1 parent ea09595 commit baed521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/ui/BitbakeStatusBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export class BitbakeStatusBar {
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.prominentBackground')
return
}
if (this.scanExitCode !== 0 || this.bitbakeScanResults.recipes.length === 0) {
if (this.scanExitCode !== 0) {
this.statusBarItem.text = '$(error) BitBake: Parsing error'
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.errorBackground')
this.statusBarItem.command = 'workbench.action.problems.focus'
this.statusBarItem.tooltip = 'Open problems view for more details'
} else {
this.statusBarItem.text = '$(library) BitBake: ' + this.bitbakeScanResults.recipes.length + ' recipes parsed'
this.statusBarItem.text = '$(library) BitBake: ' + this.bitbakeScanResults.recipes.length + ' recipes scanned'
this.statusBarItem.command = 'bitbake.rescan-project'
this.statusBarItem.tooltip = 'BitBake: Scan project for recipes'
this.statusBarItem.backgroundColor = new vscode.ThemeColor('statusBarItem.prominentBackground')
Expand Down

0 comments on commit baed521

Please sign in to comment.