Closed ohjuny closed 1 year ago
The spec from this PR is available at https://preview.sesh.rs/previews/eecs280staff/tutorials/127/.
(Available until Thu Oct 05 2023.)
I'd like to get somebody with a Windows machine to verify that I got the the paths right for WSL @melodell might be able to help?
Not a Windows person nor do I have access to one 😔
Not 100% sure about the PowerShell commands, in particular whether the %APPDATA% and %USERPROFILE% aliases can be used literally.
Will students be using Powershell? Then they can use:
PS > rm -rf "$env:APPDATA/Code"
If they'll be using WSL, then they can use:
$ APPDATA=`cmd.exe /c echo %APPDATA% 2> /dev/null | tr -d '\r' | xargs -0 wslpath`
$ echo $APPDATA
/mnt/c/Users/sesh/AppData/Roaming
$ rm -rf $APPDATA/Code
LMK if you have questions :)
Thanks for taking a look @seshrs ! A couple questions:
Is wslpath
installed by default or would a student need to install a separate package?
Does wslpath
have a simpler invocation, something like wslpath env | grep APPDATA
or something?
(Sorry I haven’t had a chance to reply yet, since I’m traveling for the next week. I think you’re right that this should be extra table without using wslpath
. I’ll check this out again next week if you don’t get a chance to try it on a Windows laptop :) )
Checking in @seshrs . Thanks for your comments!
Sorry I didn’t return to this! Unfortunately I’m… uh… traveling again (😂) and won’t be near my Windows PC for another week lol
Looking at the command, I don’t think you really need wslpath
in this invocation since it only appears to convert a Windows path to a WSL-compatible path.
In other words, almost all Windows users have the app data directory at /mnt/c/Users/<username>/AppData/Roaming
. So maybe most people won’t need the programmatic solution to get the directory path.
If the question is simply about avoiding xargs
, we could always direct students to copy the output from the CMD command, and paste it as an argument to wslpath
:)
Thanks for the confirmation @seshrs ! I think this is good to go.
Closes #92 Added Reinstall instructions within Restart section.
Not 100% sure about the PowerShell commands, in particular whether the
%APPDATA%
and%USERPROFILE%
aliases can be used literally. Do not have access to a Windows machine to test this.