Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • filesystem filesystem
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PackagesPackages
  • Core
  • filesystemfilesystem
  • Issues
  • #4
Closed
Open
Issue created Sep 25, 2022 by Codruț Constantin Gușoi@sdwolfz

Duplicated ~/.local/bin in $PATH

Due to the way bash works, you have /etc/profile being executed twice:

  • Once when your desktop environment spins up
  • Second when you start a new login shell

On the second run, it also inherits the environment from your desktop environment, meaning you already have an entry in the $PATH, so the new entry is added unconditionally, duplicating the value.

For home-local-bin.sh I propose this change:

case ":${PATH}:" in
  *:"$HOME/.local/bin":*) ;;
  *) export PATH="$HOME/.local/bin:$PATH" ;;
esac

NOTE: The value needs to be prepended, not appended.

Same thing happens in jre.sh in the same directory, but that is part of java-runtime-common

Edited Sep 25, 2022 by Codruț Constantin Gușoi
Assignee
Assign to
Time tracking