Skip to content

Commit

Permalink
remove dep on osenv, update engines to require node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 17, 2020
1 parent 2b1ef35 commit 5c0e45b
Show file tree
Hide file tree
Showing 3 changed files with 3,212 additions and 1,926 deletions.
4 changes: 2 additions & 2 deletions lib/nopt.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var url = require("url")
, path = require("path")
, Stream = require("stream").Stream
, abbrev = require("abbrev")
, osenv = require("osenv")
, os = require("os")

module.exports = exports = nopt
exports.clean = clean
Expand Down Expand Up @@ -140,7 +140,7 @@ function validatePath (data, k, val) {

var isWin = process.platform === 'win32'
, homePattern = isWin ? /^~(\/|\\)/ : /^~\//
, home = osenv.home()
, home = os.homedir()

if (home && val.match(homePattern)) {
data[k] = path.resolve(home, val.substr(2))
Expand Down
Loading

0 comments on commit 5c0e45b

Please sign in to comment.