Skip to content

Make bash more strict #3

@cjgillot

Description

@cjgillot

Bash has a lot of implicit semantics for non-existent variables.
This can cause competing directives (like $OMP) to be eaten silently.

Setting a stricter mode for bash by default can help a lot.

set -e # Abort on first error
set -u # Err on undefined variable
set -o pipefail # Err on redirection failure

This would be a breaking change. The zpp standard library is not set -u safe.
See gysela merge !633 for a few examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions