I would like to detect if I have permissions to run npm publish without actually doing a publish. I tried npm publish --dry-run, but it runs successfully even if I don't have permissions. It looks like that's only useful to show what the tarball would look like.
Is there a way to do a permission check as well?