Skip to content

Shellcheck failure on repeatable argument with allowed values #534

@jhakonen

Description

@jhakonen

Bashly Version

Latest Ruby Gem

Description

Shellcheck fails when a command argument is repeatable and has list of allowed values.

Tested with bashly 1.2.0 and shellcheck 0.10.0.

Contents of bashly.yml

name: cli commands: - name: download args: - name: target allowed: [foo] repeatable: true

Reproduction Steps

  1. Run bashly generate
  2. Run shellcheck cli

Actual Behavior

$ shellcheck cli In cli line 283: for i in "${input_array[@]}"; do ^---------------^ SC2154 (warning): input_array is referenced but not assigned. For more information: https://www.shellcheck.net/wiki/SC2154 -- input_array is referenced but not... 

Expected Behavior

Shellcheck finishes with success.

Metadata

Metadata

Assignees

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