parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

env_parallel fails silently in bash scripts that strictly exit on error


From: Glen Huang
Subject: env_parallel fails silently in bash scripts that strictly exit on error
Date: Sat, 20 Mar 2021 08:58:51 +0800

I have a non-interactive bash script like this:

```
#!/usr/bin/env bash
. $(which env_parallel.bash)
env_parallel --session
set -Eeuo pipefail
shopt -s inherit_errexit

# defs

env_parallel --lb ::: ‘echo a’ ‘echo b’
```

And the script silently fails with an exit status 1.

It seems env_parallel really doesn’t like the following:

```
set -Eeuo pipefail
shopt -s inherit_errexit
```

Is there a way to make env_parallel work without loosening the script?

BTW, is directly sourcing `which env_parallel.bash` the recommended approach 
for non-interactive scripts? I don’t see it mentioned anywhere and the 
officially documented bashrc approach only works for interactive shells.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]