Closed ptr727 closed 4 months ago
On a "clean" WSL2 Ubuntu, or Ubuntu LTS, or Debian, there is no path in cat ~/.bashrc
.
After installing GYB the PATH environment is expanded without quotes and a GYB appended as the last entry.
cat ~/.bashrc
...
export PATH=/home/pieter/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Microsoft SQL Server/140/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/piete/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/piete/.dotnet/tools:/mnt/c/Users/piete/AppData/Local/Programs/Microsoft VS Code Insiders/bin:/mnt/c/Program Files/JetBrains/JetBrains Rider 2020.3.3/bin:/snap/bin:/home/pieter/bin/gyb
See here for append: https://github.com/GAM-team/got-your-back/blob/main/install-gyb.sh#L235
See here for possible alternative expansion: https://unix.stackexchange.com/questions/79658/not-a-valid-identifier-when-i-do-export-path
See here for similar issues in WSL: https://github.com/microsoft/WSL/issues/1640
Maybe ignore the path and just register the alias?:
echo "alias gyb='~/bin/gyb/gyb'" >> ~/.bash_aliases
Abandon
The issue tracker is for reporting product deficiencies. How do I questions should be posted to the discussion forum at https://groups.google.com/group/got-your-back. When in doubt, start at the discussion forum and return here only when instructed to do so.
Please confirm the following:
Full steps to reproduce the issue:
Expected outcome (what are you trying to do?): No error
Actual outcome (what errors or bad behavior do you see instead?):
I suspect the install is not quoting paths and failing when encountering paths with spaces in names, as is very common on Windows.