Problem
[[ "$x" == "[]" ]] fails to match when x="[]". The [] on the right side of == inside [[ ]] is incorrectly interpreted as a glob pattern instead of a literal string.
Reproduction
x="[]"
if [[ "$x" == "[]" ]]; then echo "match"; else echo "no match"; fi
Real bash: match
Bashkit: no match
Root cause
In [[ ]], the right side of == supports pattern matching. However, [] is an incomplete/invalid glob character class and real bash treats it as a literal string. Bashkit's pattern matcher is likely consuming the [] as a glob construct.
Related patterns that may also be affected:
[[ "$x" == "[" ]] # literal bracket
[[ "$x" == "]" ]] # literal bracket
[[ "$x" == "[a]" ]] # this IS a valid glob — should match "a"
Impact
Breaks any script that compares against bracket-containing strings. The wedow/ticket script compares deps: [] YAML values against literal "[]" — this bug causes all dependency operations to malfunction (deps always appear non-empty).
Problem
[[ "$x" == "[]" ]]fails to match whenx="[]". The[]on the right side of==inside[[ ]]is incorrectly interpreted as a glob pattern instead of a literal string.Reproduction
Real bash:
matchBashkit:
no matchRoot cause
In
[[ ]], the right side of==supports pattern matching. However,[]is an incomplete/invalid glob character class and real bash treats it as a literal string. Bashkit's pattern matcher is likely consuming the[]as a glob construct.Related patterns that may also be affected:
Impact
Breaks any script that compares against bracket-containing strings. The wedow/ticket script compares
deps: []YAML values against literal"[]"— this bug causes all dependency operations to malfunction (deps always appear non-empty).