Fix the empty repository check in platform build.