Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nachoaldamav
Copy link
Contributor

@nachoaldamav nachoaldamav commented Jan 24, 2024

Set default package-import-method to hardlinks in Windows to avoid performance errors in systems without Dev Drives.

Close #7524
Close #7547
Close #7492

@nachoaldamav nachoaldamav requested a review from zkochan as a code owner January 24, 2024 11:27
Comment on lines 30 to 35
// Set default import method to hardlinking on Windows
if (process.platform === 'win32') {
packageImportMethodLogger.debug({ method: 'hardlink' })
return hardlinkPkg.bind(null, linkOrCopy)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be not always possible to create a hard link. For instance, if the store is not on the same drive as the node_modules. It should still fall back to copying in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I should revert the refactor and use 74f770e?

@zkochan zkochan merged commit a516ba0 into main Jan 24, 2024
@zkochan zkochan deleted the default-import-hardlink-win branch January 24, 2024 12:42
zkochan added a commit that referenced this pull request Jan 24, 2024
Close #7524
Close #7547
Close #7492

---------

Co-authored-by: Zoltan Kochan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants