-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
The migration guide section for Windows using WSL does not function properly. After running 'curl -fsSL https://docs.grit.io/install | bash' within the source code directory, the new bash instance does not have 'grit' included in the path variable. I am using an Ubuntu WSL image.
UPDATE
Did some more diagnosing, turns out the pipe command does literally nothing for the user. Why are you piping the output of a curl statement without accessing the piped output in your bash command after the pipe? You made the terminal print the file into the void. The curl command literally produces the text from the file, not a file. You need to pipe this crap into a file, then run that file in the new bash instance.
curl -fsSL https://docs.grit.io/install > grit_install_script.sh | bash
./grit_install_script.sh
In addition, you need to include the install location in the user path variable, because this is what happens if you don't:
downloading grit 0.1.0-alpha.1731963650 x86_64-unknown-linux-gnu
installing to /home/ryan/.grit/bin
grit
everything's installed!
ryan@IAmDevloper:/mnt/r/Google Drive/Code/Repositories/offline/openAI desktop user helper$ grit install
Command 'grit' not found, did you mean:
So add this command after the execution:
export PATH=$PATH:$HOME/.grit/bin
to append the install location
after this, you do not need to do grit install
it is redundant at this point. The problem with your script is you needed grit installed in order to run the grit install
command, which makes a cyclic dependency.
Original post excerpt:
Automatic migration with grit on Windows
To use grit to migrate your code on Windows, you will need to use Windows Subsystem for Linux (WSL). Installing WSL is quick and easy, and you do not need to keep using Linux once the command is done.
Here's a step-by-step guide for setting up and using WSL for this purpose:
- Open a PowerShell or Command Prompt as an administrator and run
wsl --install
.- Restart your computer.
- Open the WSL application.
- In the WSL terminal,
cd
into the appropriate directory (e.g.,cd /mnt/c/Users/Myself/my/code/
) and then run the following commands:curl -fsSL https://docs.grit.io/install | bash grit install grit apply openai
Then, you can close WSL and go back to using Windows.
Originally posted by @rattrayalex in #742