run npm update -g as sudo

Correct me if I'm wrong, but since it is updating global packages, shouldn't it be running as sudo?