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

Windows Git Bash Issue #20

Open
Yakiyo opened this issue Jul 28, 2023 · 0 comments
Open

Windows Git Bash Issue #20

Yakiyo opened this issue Jul 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Yakiyo
Copy link
Owner

Yakiyo commented Jul 28, 2023

Rust changes the path separater (\ for win and / for unix systems) based on the platform. So windows builds always use \ as a path separater. While this is completely reasonable for windows apps, this causes some slight issues with using Git Bash that comes packed with Git. Git bash uses the unix style path separater, as such to git bash, path\\to\\file is just pathtofile. A work around for this is done by using cygpath (here) to convert the windows style path to unix. This should in general solve the issue. But again, sometimes it doesnt work. This makes dsm env bash sometimes buggy.
In such cases, the fix is to manually define the dsm-dir option. This can be done via the follow two ways

# make sure to use `/` as the path separater

# define the env var for it
export DSM_DIR = "path/to/dsm/dir"
eval `dsm env bash`

# or just pass it to the cli
eval `dsm env bash --dsm-dir path/to/file

Both of them do the same thing. the default dsm dir is ~/.dsm so it can be referenced via $HOME/.dsm within the .bashrc or whatever file is being used. Until i can find the reason behind this unexpected bug, this should solve the problem. Im not even sure if this issue is just in my own dekstop only or is actually a bug. Comment to this issue if you've got any queries/suggestions etc.

NOTE: This is only applicable for windows users using Git bash. Powershell and Cmd should have no problems. This might also occur for zsh and fish but i've never gotten the oppurtunity nor do i know any method to install zsh or fish on windows without wsl

@Yakiyo Yakiyo added the bug Something isn't working label Jul 28, 2023
@Yakiyo Yakiyo pinned this issue Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant