Update empty repo handling for the benefit of new Node.js versions