Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 648
    • Issues 648
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 167
    • Merge Requests 167
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #11371

Closed
Open
Opened Apr 08, 2020 by Dana Davidsen@danaliv
  • Report abuse
  • New issue
Report abuse New issue

main/zsh: /etc/zsh/zprofile tries and fails to add $HOME/bin to PATH

/etc/zsh/zprofile tries to append $HOME/bin to PATH, but fails to do so. /etc/zsh/zprofile contains the following on lines 5 and 6:

PATH="$PATH:$HOME/bin"
export PATH

However, the very next thing /etc/zsh/zprofile does is source /etc/profile, which does this:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

This clobbers the changes made on lines 5 and 6.

I'd suggest either:

  • deleting lines 5 and 6 from /etc/zsh/zprofile, or
  • moving them to the end of the file after _src_etc_profile gets run.

(There's an argument to be made that PATH shouldn't be set in zprofile at all, but I'll save that for another day. 😇)

Steps to reproduce:

  1. apk add zsh
  2. zsh -l
  3. echo $PATH
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: alpine/aports#11371