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
Pack and unpack preserving exec perms on all package bins
This addresses the problem brought up by @boneskull on
isaacs/node-tar#210 (comment)
If a package is created on a Windows system, the file will not have the
executable bit set, as Windows determines executable status by the
filename extension.
Thus, installing with '--no-bin-links' produces a package that can't be
used as expected.
This change does the following:
- While extracting, if the manifest has been loaded, then the mode of
any bin targets is made executable.
- If the manifest is not loaded, then AFTER extraction, the mode of all
bin targets is set appropriately. (Only relevant for the FileFetcher
class, as the others will all have access to the manifest earlier in
the process.)
- When packing, all bin targets are given an executable mode in the
archive.
Thus, newer npm will properly handle archives created without proper
modes, and will always produce proper modes for the benefit of
other/older clients regardless of what fs.stat says.
Strict in what we publish, liberal in what we install.
0 commit comments