Skip to content

watchOnTermination setting not respected #6861

@mrdziuban

Description

@mrdziuban

steps

Using SBT 1.6.2, add the following watchOnTermination setting to a build.sbt file:

ThisBuild / watchOnTermination := { (action, cmd, times, state) =>
  println(s"watchOnTermination: action: $action, cmd: $cmd, times: $times, state: $state")
  state
}

Then load SBT in the project's directory, run ~compile, and then hit enter to stop triggered execution.

problem

My watchOnTermination function is not called after I hit enter to stop triggered execution

expectation

The watchOnTermination function should be called when I hit enter and I should see my println message in the console

notes

Apologies if I'm misunderstanding how this setting is supposed to work. I see that it's not documented with the other watch* settings, I just learned about it by reading through the source code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugarea/watchIssues around ~ (triggered execution, watch)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions