mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Update README.md for background tasks (#826)
This commit is contained in:
parent
660b55c2f0
commit
5782e2b5d2
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,7 @@ with-env { FOO: ($foo | to json) } {
|
|||
}
|
||||
```
|
||||
|
||||
## How can I reuse custom commands in a background task?
|
||||
### How can I reuse custom commands in a background task?
|
||||
|
||||
You can define these commands in a seperate module, like so:
|
||||
|
||||
|
@ -63,3 +63,6 @@ task spawn {
|
|||
foo bar
|
||||
}
|
||||
```
|
||||
## Troubleshooting
|
||||
|
||||
- On some setups (e.g. NixOS with `nu` installed as a binary in user's `$HOME`), `sh` (which `pueue` delegates tasks to run) might fail to find `nu` in the `$PATH`. In this case hard-coding the location of your nu binary in the `task spawn` function definiton in `task.nu` can solve the issue.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue