1

When running the following script:

#!/bin/bash
set -e
export X=$(false)
echo That did not abort
X=$(false)
echo That did abort

It outputs:

That did not abort

So export X= doesn't abort the execution, but X= does.

Why does it not abort on an erroneous export X=, even though set -e is set?

0 Answers0