from https://github.com/nushell/nupm/pull/56
from #56