Skip to content

use /public for home#2061

Merged
RohitKushvaha01 merged 1 commit into
Acode-Foundation:mainfrom
RohitKushvaha01:main
Apr 27, 2026
Merged

use /public for home#2061
RohitKushvaha01 merged 1 commit into
Acode-Foundation:mainfrom
RohitKushvaha01:main

Conversation

@RohitKushvaha01
Copy link
Copy Markdown
Member

No description provided.

@RohitKushvaha01 RohitKushvaha01 merged commit 6e9ca9e into Acode-Foundation:main Apr 27, 2026
5 checks passed
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This PR changes the HOME directory for the Alpine terminal environment from /home to /public, likely to point to Android's publicly accessible storage. However, the change is incomplete — the initrc heredoc written at line 162 of the same file still sets export HOME=/home, and since initrc is sourced as the bash rcfile on every terminal session startup, the effective HOME for interactive users remains /home despite the line 3 change.

  • The initrc heredoc at line 162 must also be updated to export HOME=/public for the change to take effect in interactive bash sessions.

Confidence Score: 3/5

The PR's intended change is effectively a no-op due to the initrc heredoc overriding HOME back to /home on every interactive session.

A P1 defect is present: the HOME=/public set at line 3 is overridden by HOME=/home in the initrc heredoc (line 162) that is sourced as the bash rcfile. The change will not take effect for users without also updating line 162.

src/plugins/terminal/scripts/init-alpine.sh — specifically line 162 inside the initrc heredoc.

Important Files Changed

Filename Overview
src/plugins/terminal/scripts/init-alpine.sh Changes HOME from /home to /public at the top level, but the initrc heredoc (line 162) still sets HOME=/home, overriding the change for every interactive bash session.

Sequence Diagram

sequenceDiagram
    participant Script as init-alpine.sh
    participant Axs as axs (chroot helper)
    participant Bash as bash --rcfile /initrc

    Script->>Script: export HOME=/public (line 3)
    Script->>Script: write /initrc heredoc<br/>includes: export HOME=/home (line 162)
    Script->>Axs: exec axs -c bash --rcfile /initrc -i
    Axs->>Bash: launch interactive session
    Bash->>Bash: source /initrc → HOME overridden back to /home
    Note over Bash: Effective HOME = /home (not /public)
Loading

Comments Outside Diff (1)

  1. src/plugins/terminal/scripts/init-alpine.sh, line 162 (link)

    P1 initrc heredoc HOME not updated to match

    This hardcoded export HOME=/home in the initrc heredoc will override the HOME=/public change made at line 3, since initrc is sourced as the bash rcfile on every terminal startup. This line must be updated to export HOME=/public to make the intended change take effect for interactive sessions.

Reviews (1): Last reviewed commit: "Update init-alpine.sh" | Re-trigger Greptile

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/share/bin:/usr/share/sbin:/usr/local/bin:/usr/local/sbin:/system/bin:/system/xbin:$PREFIX/local/bin
export PS1="\[\e[38;5;46m\]\u\[\033[39m\]@localhost \[\033[39m\]\w \[\033[0m\]\\$ "
export HOME=/home
export HOME=/public
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 initrc heredoc still sets HOME=/home, overriding this change

The HOME=/public set at line 3 is immediately overridden when bash launches. The initrc heredoc written at line 162 (inside this same script) still contains export HOME=/home, and that file is sourced as the rcfile for every interactive session via "$PREFIX/axs" -c "bash --rcfile /initrc -i" (line 248). As a result, users will still get HOME=/home in their shells despite this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant