You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can't just wait for the exitCh (from cli.NewResponseEmitter) to finish. We need to wait for Run and PostRun to finish. Otherwise, we don't properly close the datastore.
The text was updated successfully, but these errors were encountered:
It wasn't a reliable way to determine if the command was "done". We need to wait
for run, post-run, etc. to finish first.
* Fixes#143
This commit:
1. Removes the exit channel from the CLI response emitter.
2. Adds a `Status()` function to the `cli.ResponseEmitter` as a replacement
for (1).
3. Renames `Exit(code)` to `SetStatus(code)`. This new function doesn't
immediately _do_ anything other than set the status.
4. Make sure to wait for _everything_ to finish before returning from `cli.Run`.
It wasn't a reliable way to determine if the command was "done". We need to wait
for run, post-run, etc. to finish first.
* Fixes#143
This commit:
1. Removes the exit channel from the CLI response emitter.
2. Adds a `Status()` function to the `cli.ResponseEmitter` as a replacement
for (1).
3. Renames `Exit(code)` to `SetStatus(code)`. This new function doesn't
immediately _do_ anything other than set the status.
4. Make sure to wait for _everything_ to finish before returning from `cli.Run`.
We can't just wait for the
exitCh
(fromcli.NewResponseEmitter
) to finish. We need to wait forRun
andPostRun
to finish. Otherwise, we don't properly close the datastore.The text was updated successfully, but these errors were encountered: