1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

fix: pause in background_task (#1138)

i found out that it worked incorrectly, so i fixed it based on other
functions in the module
This commit is contained in:
shimeoki 2025-06-29 21:07:57 +03:00 committed by GitHub
parent 156a0110c7
commit 45934922f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -179,20 +179,20 @@ export def restart [
# #
# A paused group won't start any new tasks automatically. # A paused group won't start any new tasks automatically.
export def pause [ export def pause [
...ids: int # IDs of the tasks to pause. ...ids: int # IDs of the tasks to pause.
--group (-g) # Pause a specific group --group (-g): string # Pause a specific group
--all (-a) # Pause all groups. --all (-a) # Pause all groups.
--wait (-w) # Only pause the specified group and let already running tasks finish by themselves --wait (-w) # Only pause the specified group and let already running tasks finish by themselves
] { ] {
mut args = [] mut args = []
if $group != null { if $group != null {
$args = ($args | prepend "--group") $args = ($args | prepend ["--group" $group])
} }
if $all != null { if $all {
$args = ($args | prepend "--all") $args = ($args | prepend "--all")
} }
if $wait != null { if $wait {
$args = ($args | prepend "--wait") $args = ($args | prepend "--wait")
} }