-
Notifications
You must be signed in to change notification settings - Fork 823
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
~/.local/bin not ending up on executable path #2148
Comments
Looks like it was fixed in bash 4.3.15 but I have bash 4.3.48 which is later but does not have the fix. The full version I have is: |
@mungojam - Hmm.... You look like to say a program
Put above line to ~/.bashrc file. REF: |
@sunjoong Thanks for the tip, I managed to get it working by re-running the pip call with sudo. I think it should be added as a standard path since that what Ubuntu itself has done now and python/pip are a major use case for BashOnWindows which is trying to be as frictionless as possible for developers. |
@mungojam - You may be right or not, but that would be an ubuntu issue, not bash on ubuntu on windows issue, I think, becasue bash on ubuntu on windows is a just name called as linux subsystem for windows (WSL); For example, I'm a gentoo linux user on WSL, not ubuntu, and ~/.local/bin is not a linux standard. |
@sunjoong see my comment about bash. It looks like it was fixed in an earlier version of bash. So my suspicion is that BashOnWindows alters the path in order to add the windows path, but hasn't taken the change to bash. I'll admit I don't fully get how the WSL vs. Bash For Windows is implemented since I didn't specifically choose ubuntu, it was the default that got deployed. Regarding the standard, you're right it isn't a standard and some linux distributions have decided not to use it. Fedora had a rather large discussion about it here, though I can't tell if they went with it or not in the end. But since ubuntu does have it, and yet the install of ubuntu done by Windows 10 doesn't have it, it seems the issue lies with BashOnWindows somehow. |
@mungojam - I said that would be a ubuntu issue and ubuntu adapted that already by appending I heard next (or next after next) version will provide login mode as default, but you could do it now by appending option like " |
You're right, it is set in .profile which isn't then used. I've now been reading up a lot on login mode which I didn't know about previously so thank you for bearing with me and identifying the issue. With 'C:\Windows\System32\bash.exe ~ -l' I did indeed get it in the path. I've found issue #816 regarding the change you mention. Looks like it is changed in current development build so hopefully that will filter through at some point. Your workarounds are very handy in the time being and I've learnt some things, so thanks :). |
I thought this might have been fixed in Fall Creator's Update, but it doesn't seem to have been. I've tried my original steps in Ubuntu and it still doesn't work, since presumably it is still not a login shell by default? |
My mistake, sorry. Ran cfn_flip (the package name) rather than cfn-flip. It's all working fine |
Your Windows build number:
Version 10.0.15063
What you're doing and what's happening:
I was trying to install a python pip script from here. It installs fine, but unless I use sudo pip, I can't run it directly from the console because it installs into ~/.local/bin/ which doesn't appear to be picked up as a path variable.
Steps to reproduce:
It's possible to run it fine using ~/.local/bin/cfn_flip -h
My path variable is:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files/dotnet:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/MiKTeX 2.9/miktex/bin/x64:/mnt/c/Users/mark/Dropbox/Marks/Apps/Python36/Scripts:/mnt/c/Users/mark/Dropbox/Marks/Apps/Python36:/mnt/c/Users/mark/AppData/Local/Programs/Python/Launcher:/mnt/c/Users/mark/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files (x86)/Microsoft VS Code/bin
The above should be runnable and should give the standard usage instructions for the script
Looks like it is a standard path for some recent versions of ubuntu as per
this stackexchange question
The text was updated successfully, but these errors were encountered: