Skip to content

Command validation fails with 'Bad substitution' error on shell array indexing #3529

@KJ7LNW

Description

@KJ7LNW

When using shell array indexing expressions like ${array[var]}, command validation fails with error:

Bad substitution: levels[31224

This occurs when trying to validate shell commands that use array indexing with variables, such as:

level=${levels[30232 % ${#levels[@]}]}

The error is thrown by the shell-quote library when parsing these expressions.

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