Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
fix(link): properly detect that we should chown the link
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 15, 2019
1 parent 8231188 commit 1c69beb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ function link (from, to, opts, cb) {
[fs, 'symlink', target, to, 'junction']
]

if (chown.selfOwner !== 0) {
if (chown.selfOwner.uid !== 0) {
chain(tasks, cb)
} else {
inferOwner.then(owner => {
inferOwner(to).then(owner => {
tasks.push([chown, to, owner.uid, owner.gid])
chain(tasks, cb)
})
Expand Down

0 comments on commit 1c69beb

Please sign in to comment.