Use hardlinks for portable aliases without renaming originals#6308
Open
Trenly wants to merge 3 commits into
Open
Use hardlinks for portable aliases without renaming originals#6308Trenly wants to merge 3 commits into
Trenly wants to merge 3 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
This implementation is based largely in part on #6270. I believe the approach of creating the hardlinks next to the original executables instead of as a fallback within the symlink flow has the following benefits:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description
This PR updates portable alias handling to preserve original executable names and use hardlink aliases instead of renaming files.
What changed
CreateHardlink(...)insrc/AppInstallerSharedLib/Public/winget/Filesystem.hsrc/AppInstallerSharedLib/Filesystem.cppPortableFileType::Hardlinkand hardlink entry creation in:src/AppInstallerCommonCore/Public/winget/PortableFileEntry.hsrc/AppInstallerCLICore/Workflows/PortableFlow.cppto:--rename,Commands, andPortableCommandAlias--renameis used for archive portables (ignored)src/AppInstallerCLICore/PortableInstaller.cppto:src/AppInstallerCLIE2ETests/InstallCommand.cssrc/AppInstallerCLIE2ETests/UninstallCommand.csdoc/ReleaseNotes.md.User-visible behavior
🔗 References
Command line alias added: "<alias>"toPackage added to PATH environment variablewhen installing portable software without admin rights in user scope #4043🔍 Validation
✅ Checklist
📋 Issue Type
Created with assistance from GitHub Copilot.