Skip to content

Commit

Permalink
feat: declare and export the original user path
Browse files Browse the repository at this point in the history
@mmorenoregalado proposes to maintain consistency among different nodes and sessions through CodelyTV@8dc02e4 and CodelyTV#172, which generates a side-effect for users and adds a possible code smell in the future because it introduces an if-else pattern based on a condition that users may not expect. Also it doesn't allow the user to employ other environment variables, so we apply the template engine ideas and differentiate the application of Bash expansion.
  • Loading branch information
sanchezcarlosjr committed Apr 13, 2024
1 parent 12ca79c commit b2f3de7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions installer
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ _w "~ │ 🚀 Welcome to the ${green}dotly${normal} installer! │ ~"
_w " └────────────────────────────────────┘"
_w
_q "Where do you want your dotfiles to be located? (default ~/.dotfiles)" "DOTFILES_PATH"
DOTFILES_PATH="${DOTFILES_PATH:-$HOME/.dotfiles}"
DOTFILES_PATH="$(eval echo "$DOTFILES_PATH")"
UNEXPANDED_DOTFILES_PATH="${DOTFILES_PATH:-\$HOME/.dotfiles}"
DOTFILES_PATH="$(eval echo "$UNEXPANDED_DOTFILES_PATH")"
export DOTFILES_PATH="$DOTFILES_PATH"
export UNEXPANDED_DOTFILES_PATH="$UNEXPANDED_DOTFILES_PATH"

dotly_inner_path="modules/dotly"
export DOTLY_PATH="$DOTFILES_PATH/$dotly_inner_path"
Expand Down

0 comments on commit b2f3de7

Please sign in to comment.