Skip to content

Commit

Permalink
remove extraneous isNaN checking in git opts
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Dec 4, 2019
1 parent e33c9ce commit dfccb4f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/util/git/opts.js
Expand Up @@ -4,12 +4,13 @@ module.exports = (_gitOpts = {}, opts = {}) => {
const gitOpts = {
env: gitEnv()
}
if (isRoot && +opts.uid && !isNaN(opts.uid)) {

if (isRoot && +opts.uid)
gitOpts.uid = +opts.uid
}
if (isRoot && +opts.gid && !isNaN(opts.gid)) {

if (isRoot && +opts.gid)
gitOpts.gid = +opts.gid
}

Object.assign(gitOpts, _gitOpts)
return gitOpts
}

0 comments on commit dfccb4f

Please sign in to comment.