This document (https://snapcraft.io/docs/snap-layouts) says:
<source-path>must refer to either
However, snapcraft ver.
4.5.4.post11+git82024d37 shows the following error.
layout “/foo/bar” uses invalid symlink old name “/tmp”: must start with $SNAP, $SNAP_DATA or $SNAP_COMMON
Alternatively, the error will be the following.
layout “/foo/bar” uses invalid symlink old name “$SNAP_USER_DATA/tmp”: reference to unknown variable “$SNAP_USER_DATA”
Which is the correct behaviour? I assume the document is wrong.