Node version (or tell us if you're using electron or some other framework):
v10.19.0
ShellJS version (the most recent version/Github branch you see the bug on):
tip-of-tree master branch
Operating system:
Ubuntu 20.04
Description of the bug:
It looks like cp('sourceFile', 'destFile') updates the atime (access time) attribute of the source file. Unix cp doesn't seem to update the atime.
I noticed this while working on #869.
Example ShellJS command to reproduce the error:
shell.touch({ '-d': new Date(newModifyTimeMs), '-m': true }, srcFile);
shell.cp(srcFile, `${t.context.tmp}/dest`);
const stat = common.statFollowLinks(srcFile);
t.is(stat.mtime.getTime(), newModifyTimeMs); // mtime seems OK
t.is(stat.atime.getTime(), newAccessTimeMs); // this one fails
Node version (or tell us if you're using electron or some other framework):
v10.19.0
ShellJS version (the most recent version/Github branch you see the bug on):
tip-of-tree master branch
Operating system:
Ubuntu 20.04
Description of the bug:
It looks like
cp('sourceFile', 'destFile')updates theatime(access time) attribute of the source file. Unixcpdoesn't seem to update the atime.I noticed this while working on #869.
Example ShellJS command to reproduce the error: