Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework activate to support more configurations #657

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

shadowspawn
Copy link
Collaborator

@shadowspawn shadowspawn commented Feb 27, 2021

Pull Request

Ideally copying the files during install would be a simpe command. Not so in practice! The original two folder copies have grown over the years to cope with special cases and add functionality.

Problem

  • using multiple code paths depending on install
    • if top level target folder is symlink, use find and cp
    • if preserving npm, use rsync
    • else (normal) use cp
  • requiring rsync for --preserve
  • not supporting OS with symlink for /usr/local/share/man, such as archinux (Error when copying .../share/man #100)
  • installing global packages when using n exec would pollute cache and affect later installs

Solution

Use hand-crafted code for install using just find and cp. Use same code independent of symlinks.

Only copy known binaries and expected node_modules to mitigate cache pollution (n exec).

A downside is slightly less robust about future changes to what is contained in archive.

ChangeLog

  • support installs where /usr/local/share/man is a symlink (such as archlinux)
  • remove requirement for rsync for --preserve
  • avoid pollution if user installs global packages when using n exec

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Mar 12, 2021
@shadowspawn shadowspawn merged commit f1d0dd5 into develop Mar 12, 2021
@shadowspawn shadowspawn deleted the feature/find-and-copy branch March 12, 2021 06:42
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant