mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-16 08:50:31 +03:00
Update README.md for background tasks (#826)
This commit is contained in:
parent
660b55c2f0
commit
5782e2b5d2
@ -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…
Reference in New Issue
Block a user