[Ubuntu] cli-walkthrough adds path to .bash_profile, while .profile might already include ~/bin dir if it exists
- Dominant language
- No language data
- Stars
- 3
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I'm running Ubuntu 18.04. The CLI walkthrough for Linux has a section which describes adding the `~/bin` dir to the PATH if it doesn't already exist. For Ubuntu, the `.profile` script already checks whether or not the `~/bin` directory exists and if so, adds it to the path.
In cases where the directory doesn't yet exist, the user creates it and then runs
```bash
[[ ":$PATH:" == *":$HOME/bin:"* || ":$PATH:" == *":~/bin:"* ]] && echo "~/bin is in PATH" || echo "~/bin is not in PATH"
```
the output will be
```bash
~/bin is not in PATH
```
Resulting in the user creating a `.bash_profile` file adding `~/bin` to the path, which isn't necessary. Simply running `source .profile` or restarting is sufficient for the `~/bin` dir to be added to the PATH.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.