Commit 223aa08
fix(strace): fix the test for an associative array
The original test seems to try to check whether the array `syscalls`
is non-empty, but this does not work for associative arrays. The
expansion ${array_name} references ${array_name[0]}, but
${array_name[0]} does not necessarily exist even when the array is
non-empty when the array is an associative array or a sparse array.
We can explicitly check the number of elements.1 parent 1d2aac1 commit 223aa08
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
0 commit comments