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

Update Windows installation documentation to recommend manual method #1247

Closed
kennethd opened this issue Oct 26, 2022 · 6 comments
Closed

Update Windows installation documentation to recommend manual method #1247

kennethd opened this issue Oct 26, 2022 · 6 comments

Comments

@kennethd
Copy link

I am a linux user & do all of my development there, but started playing around with rust on a windows machine & just blindly followed the instructions at https://github.com/rust-lang/rustlings/#windows

This installation method requires installing with administrator privileges, installs into a protected system folder, which is read-only by default, and therefore, upon completion, rightly triggers errors from anti-virus software

Vim won't even cd to this protected directory

Upon realizing all of this, I undid it all by running cargo uninstall rustlings from the same administrator PowerShell session & manually deleting c:\\Windows\System32\rustlings, and did the manual installation steps as a regular user with no problem

There have been a couple past issues created by people who found themselves in trouble after following these instructions, e.g. #878

@shadows-withal
Copy link
Member

The install script installs into $pwd/rustlings by default. It seems like in your case, that was c://Windows/System32. Is that a Window default? I'd assumed a shell would not start in a directory like this, unless that's because the shell is in administrator mode? Apologies, I don't use Windows, so I can offer limited support here. I'd still like to have some sort of semi-automatic way of installing Rustlings on Windows, but maybe we can adjust things a bit.

@kennethd
Copy link
Author

It looks like if you open PowerShell as Administrator the default $pwd is indeed C:\Windows\system32 -- something I perhaps should have noticed. If I do cd $HOME and mkdir tmp and cd tmp before running the Start-BitsTransfer line it does install there, but still installs it read-only & owned by the administrator account

Sorry that's not a lot of help, I probably know windows less than you, but do have a windows 10 laptop here I can test with :)

@MarcosDanielTorres
Copy link

Hey everyone! As kennethd stated the default directory when starting powershell as admin is C:\Windows\system32. Maybe it would be better if at line 4 of install.ps1 instead of $pwd we use $home, as the later will refer to C:\Users\MyUser

As follows:
param($path = "$home/rustlings")

@Illiou
Copy link

Illiou commented Jun 14, 2023

It just installed Rustlings in my System32 folder too. The intructions need to mention that you need to navigate to the desired folder first or the script needs to act more intelligently. Current situation is not very user friendly and will mean a broken installation for most users on the first try.

@shadows-withal
Copy link
Member

Updated the script to install in $home/rustlings for now, until we find a better solution.

@mo8it
Copy link
Contributor

mo8it commented Mar 30, 2024

This issue will be prevented by #1919

@mo8it mo8it closed this as completed Mar 30, 2024
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

No branches or pull requests

5 participants