leanprover / elan

The Lean version manager
Apache License 2.0
292 stars 34 forks source link

.\elan-init.ps1 fails with `UnauthorizedAccess` on a fresh Windows machine #96

Closed semorrison closed 1 year ago

semorrison commented 1 year ago

The README installation instructions for Windows fails on a freshly installed Windows 10 machine with:

C:\Users\kim>powershell -f elan-init.ps1
File C:\Users\kim\elan-init.ps1 cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess
Kha commented 1 year ago

Does adding -ExecutionPolicy Bypass to that line help?

semorrison commented 1 year ago

Yes, that does work. Or rather, it gets us to the next error message:

info: downloading installer to C:\Users\kim\AppData\Local\Temp\
Elan failed with error code -1073741515
1