fix: show LocalStack setup on only when setup is required#58
Conversation
| }); | ||
|
|
||
| // Update the status immediately on file tracker initialization | ||
| void updateStatus(); |
There was a problem hiding this comment.
FYI I checked the docs and chokidar docs should call one of their callbacks upon initialization:
ignoreInitial (default: false). If set to false then add/addDir events are also emitted for matching paths while instantiating the watching as chokidar discovers these file paths (before the ready event).
So I think this shouldn't be required, although it doesn't hurt either.
There was a problem hiding this comment.
I retract my words.
Chokidar will only emit add if the file was already present, but won't emit unlink. We are interested in that, as well, so we have to run the check.
This ensures that pop-up appears if setup is required at the start. Instead of synchronizing changes at the start we decided to have pop-up appearing every time the setup is broken. This shouldn't happen normally, but when it happens then setup wizard pop-up in addition to painting setup bar red can actually be helpful.
skyrpex
left a comment
There was a problem hiding this comment.
We need to restore the early return in case some of the values were undefined. Thanks @anisaoshafi for catching the bug.
We've had a couple of race conditions and missing status check dependencies. This resulted in LocalStack Setup notification being shown when the setup is not required - this was happening on the most of VS Code starts.
This PR fixes it with the following: