Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Write Truffle Project Loader Script to Temp Directory to Circumvent Windows Permission Issues #1153

Merged
merged 3 commits into from
Mar 12, 2019

Conversation

mikeseese
Copy link
Contributor

Apparently the fix in #1149 doesn't work fully for the Appx distributable. Windows gives a EPERM: operation not permitted, lstat 'C:\Program Files\WindowsApps' error. The unpacked version for Appx is put into a subfolder of this system-protected folder and therefore the node process doesn't have access to reading the file. To circumvent the issue, this PR will write the contents of this file to a temp.mkdirSync() temporary directory (and should be removed automatically) which the node process can access.

This approach is being used for all OS's despite only needed for Windows Appx to keep the execution path similar across platforms.

Copy link
Contributor

@honestbonsai honestbonsai left a comment

Choose a reason for hiding this comment

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

As far as the code goes, it looks good to me.

@mikeseese mikeseese merged commit 0d6aa44 into develop Mar 12, 2019
@mikeseese mikeseese deleted the fix/windows-appx-permissions branch March 12, 2019 16:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants