Test -r doesn't work for latest Alpine builds of dash
dash -c '[ -r "/tmp" ] && echo ok || echo fail'
Should print ok
, and does so on Alpine 3.13 (dash 0.5.11.3-r0).
Alpine 3.14 (dash 0.5.11.4-r0) prints fail
.
Alpina 3.15, 3.16 and edge (dash 0.5.11.5-r0) prints fail
.
From dash manpage:
-r file' True if file exists and is readable.