Skip to content

Commit 4593492

Browse files
authored
fix: pause in background_task (#1138)
i found out that it worked incorrectly, so i fixed it based on other functions in the module
1 parent 156a011 commit 4593492

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

modules/background_task/task.nu

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,20 @@ export def restart [
179179
#
180180
# A paused group won't start any new tasks automatically.
181181
export def pause [
182-
...ids: int # IDs of the tasks to pause.
183-
--group (-g) # Pause a specific group
184-
--all (-a) # Pause all groups.
185-
--wait (-w) # Only pause the specified group and let already running tasks finish by themselves
182+
...ids: int # IDs of the tasks to pause.
183+
--group (-g): string # Pause a specific group
184+
--all (-a) # Pause all groups.
185+
--wait (-w) # Only pause the specified group and let already running tasks finish by themselves
186186
] {
187187
mut args = []
188188

189189
if $group != null {
190-
$args = ($args | prepend "--group")
190+
$args = ($args | prepend ["--group" $group])
191191
}
192-
if $all != null {
192+
if $all {
193193
$args = ($args | prepend "--all")
194194
}
195-
if $wait != null {
195+
if $wait {
196196
$args = ($args | prepend "--wait")
197197
}
198198

0 commit comments

Comments
 (0)