You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found which seems an error not thrown when I try to change ownership of a folder that doesn't exist, in opposition to the behaviour found in fs.chown and in Linux terminal. Look:
chown nobody /folder/not/exist
#chown: can't access '/folder/not/exist': File or directory not foundecho$?#1
require("fs").chown('/folder/not/exist',process.getuid(),process.getgid(),err=>{console.error(err);});// { [Error: ENOENT: no such file or directory, chown '/folder/not/exist']// errno: -2,// code: 'ENOENT',// syscall: 'chown',// path: '/folder/not/exist' }require('chownr')('/folder/not/exist',process.getuid(),process.getgid(),err=>{console.error(err);});//undefined
Okay, It's easy to workaround, but maybe, embed this can be an improvement.
The text was updated successfully, but these errors were encountered:
I found which seems an error not thrown when I try to change ownership of a folder that doesn't exist, in opposition to the behaviour found in
fs.chown
and inLinux terminal
. Look:Okay, It's easy to workaround, but maybe, embed this can be an improvement.
The text was updated successfully, but these errors were encountered: