yarn icon indicating copy to clipboard operation
yarn copied to clipboard

`yarn pack` on Windows doesn't put execute permissions on directories

Open nborko opened this issue 4 years ago • 1 comments

Bug description

Running yarn pack on Windows creates a tarball that doesn't include execute permissions on directories.

Command

yarn pack

What is the current behavior? All directories and files are 0666. It's understandable that executable files may not be executable, even under git-bash, but the resulting tarball cannot be extracted in a POSIX environment due to incorrect directory permissions.

What is the expected behavior? Tarballs generated from yarn pack in Windows should be extractable everywhere tar is supported.

Steps to Reproduce Run yarn pack on Windows, copy the tarball to Linux, MacOS X, etc., and tar zxf package-version.tgz

Environment

  • Node Version: v12.14.1
  • Yarn v2 Version: 1.22.4 (yarn v1 also exhibits this behavior)
  • OS and version: Windows 10 Pro 1909 18363.815

nborko avatar May 08 '20 19:05 nborko