mirror of https://github.com/sbt/sbt.git
There may be instances where the user may wish to stop the watch if an error occurs running the task. To facilitate this, I add boolean parameter, lastStatus, to watchShouldTerminate. The value is computed by modifying the state used to run the task to have a custom onFailure command. If the task fails, the returned state will have the onFailure command will be enqueued at the head of the remaining commands. The result of the task then becomes true if the custom onFailure is not present in the remaining commands and false if it is. We don't actually run this command, so it's just implemented with the identity function. I also updated Watched.watch to return an Action instead of Unit. This enables us to return a failed state if Watched.watch returns HandleError. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||