Skip to content

Commit 449dd3d

Browse files
authored
feat(task.nu): Trim | from the closure (#1184)
Also trim pipe characters (`|`) so it doesn't error out if the closure is defined with empty args. ```nu let $task = {|| ... } ```
1 parent 0b97c5e commit 449dd3d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/background_task/task.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export def spawn [
5252
(
5353
view source $command
5454
| str trim --left --char "{"
55+
| str trim --left --char "|"
5556
| str trim --right --char "}"
5657
)
5758
| save --force $source_path

0 commit comments

Comments
 (0)