Skip to content

Conversation

er1c
Copy link
Contributor

@er1c er1c commented Oct 21, 2021

Fixes #6696

OSX

$ ./sbt shutdownall
shutdown 1 sbt processes
$ ./sbt shutdownall
shutdown 0 sbt processes

Windows

PS C:\Users\Eric Peters> sbt shutdownall
SUCCESS: The process with PID 9948 has been terminated.
shutdown 1 sbt processes
PS C:\Users\Eric Peters> sbt shutdownall
shutdown 0 sbt processes
PS C:\Users\Eric Peters> sbt shutdownall
shutdown 0 sbt processes
PS C:\Users\Eric Peters> sbt shutdownall
SUCCESS: The process with PID 16512 has been terminated.
shutdown 1 sbt processes
PS C:\Users\Eric Peters>

@eed3si9n
Copy link
Member

May I suggest a slightly gentler name like shutdownall?

@er1c er1c force-pushed the 6696-killall-runner-command branch from 0cf74a3 to 290a4cf Compare October 21, 2021 16:14
@er1c
Copy link
Contributor Author

er1c commented Oct 21, 2021

shutdownall

@eed3si9n done!

@er1c er1c changed the title [#6696] Add --killall to sbt runner to kill all sbt-launch processes [#6696] Add --shutdownall to sbt runner to shutdown all sbt-launch processes Oct 21, 2021
@eed3si9n
Copy link
Member

I understand this is not a real sbt command like shutdown, but it might be confusing that to shutdown one you don't need -- but to shutdown all, you need --. My suggestion would be to pretend this is a command and call it:

$ sbt shutdownall

WDYT?

Also, could there be a Windows parity for this feature?

@er1c
Copy link
Contributor Author

er1c commented Oct 21, 2021

I understand this is not a real sbt command like shutdown, but it might be confusing that to shutdown one you don't need -- but to shutdown all, you need --. My suggestion would be to pretend this is a command and call it:

$ sbt shutdownall

WDYT?

Also, could there be a Windows parity for this feature?

I like it, thanks for thinking outside the box and consistency in usage. I'll also see about the windows parity.

@er1c er1c force-pushed the 6696-killall-runner-command branch from 290a4cf to 9516e10 Compare October 21, 2021 17:42
@er1c er1c changed the title [#6696] Add --shutdownall to sbt runner to shutdown all sbt-launch processes [#6696] Add shutdownall to sbt runner to shutdown all sbt-launch processes Oct 21, 2021
@er1c
Copy link
Contributor Author

er1c commented Oct 21, 2021

@eed3si9n updated, removed the -- and added .bat support

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n added this to the 1.6.0 milestone Oct 21, 2021
@eed3si9n eed3si9n added the area/runner-script issues around sbt-the-bash-script, or bat script label Oct 21, 2021
@eed3si9n eed3si9n merged commit 9e71209 into sbt:develop Oct 22, 2021
@charego
Copy link

charego commented Apr 27, 2022

Note with environment variable SBT_NATIVE_CLIENT=true, you will also need to supply --server for this to work.

$ sbt --server shutdownall
shutdown 1 sbt processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runner-script issues around sbt-the-bash-script, or bat script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a shutdownall sbt
3 participants