Skip to content

Unbound variables cause a crash when running examples with 'set -u' #65

@adudek

Description

@adudek

tested in bash 4.3+
when setting 'set -u' in example/array.sh, I receive:
bash-oo-framework/lib/util/command.sh: line 34: $3: unbound variable

there are more errors elsewhere, after performing "${unboundvar:-}"

Is this conscious design decision related to bash version?
Sometimes I want my script to fail, not to cause more mayhem in unpredictable way. How to overcome this?

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