Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
androdeb: fix incorrect home directory variable
Browse files Browse the repository at this point in the history
The following command fails on androdeb.

The output looks like:
curl https://sh.rustup.rs -sSf | sh
info: downloading installer
error: $HOME differs from euid-obtained home directory: you may be using sudo
error: if this is what you want, restart the installation with `-y'

This is because home directory wasn't set.

Signed-off-by: Joel Fernandes <[email protected]>
  • Loading branch information
joelagnel committed Jul 10, 2018
1 parent 241160e commit 7880b49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ echo ""
touch .banner.shown

fi

homedir=$( getent passwd "$USER" | cut -d: -f6 )
export HOME=$homedir
cd $HOME
4 changes: 4 additions & 0 deletions addons/bashrc.silent
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
source .bashrc.common

homedir=$( getent passwd "$USER" | cut -d: -f6 )
export HOME=$homedir
cd $HOME

0 comments on commit 7880b49

Please sign in to comment.