Skip to content

Local readonly variables not declared correctly #9

Closed
@brikis98

Description

@brikis98

We currently use local readonly to declare local, read-only variables. It turns out that this is not the right way to do it. The proper way is:

local -r var="$1"

For arrays, you need:

local -ar var=(foo bar)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions