Skip to content

Commit

Permalink
fix: Project Path was incorrect on WSL (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-martinez authored Jul 26, 2024
1 parent bd8d577 commit c26ac98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clone
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ elif [[ "$OSTYPE" == "msys" ]]; then
PROJECTS_FILE="/c/Users/$USERNAME/AppData/Roaming/Code/User/globalStorage/alefragnani.project-manager/projects.json"
elif [[ $(grep -i microsoft /proc/version) ]]; then
PROJECTS_FILE="/mnt/c/Users/$USER/AppData/Roaming/Code/User/globalStorage/alefragnani.project-manager/projects.json"
# This condition is for when the `Project Manager` extension is installed on Windows and not on WSL.
if [ ! -d "$PROJECTS_FILE" ]; then
WINDOWS_USERNAME=$(cmd.exe /c echo %USERNAME% 2>/dev/null | tr -d '\r')
PROJECTS_FILE="/mnt/c/Users/$WINDOWS_USERNAME/AppData/Roaming/Code/User/globalStorage/alefragnani.project-manager/projects.json"
fi

path_prefix='vscode-remote://wsl+ubuntu'
else
PROJECTS_FILE="$HOME/.config/Code/User/globalStorage/alefragnani.project-manager/projects.json"
Expand Down

0 comments on commit c26ac98

Please sign in to comment.