Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotfiles backup fails on "dotly/restorer" #207

Open
pablobernardo opened this issue Apr 13, 2022 · 0 comments
Open

dotfiles backup fails on "dotly/restorer" #207

pablobernardo opened this issue Apr 13, 2022 · 0 comments

Comments

@pablobernardo
Copy link
Contributor

"dotly/restorer" fails on dotfiles backup because calls create_dotfiles_dir instead of backup_dotfiles_dir

{▸} ~ bash <(curl -s https://raw.githubusercontent.com/CodelyTV/dotly/HEAD/restorer)
  ┌────────────────────────────────────┐
~ │ 🚀 Welcome to the dotly restorer!  │ ~
  └────────────────────────────────────┘

Checking if Git is installed
 > Git command exists on this system

 > Curl command exists on this system
🤔 Where do you want your dotfiles to be located? (default ~/.dotfiles) :
🤔 🗂 Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n] : Y
/dev/fd/11: línea 194: create_dotfiles_dir: orden no encontrada

Current code:

# Backup if currently there are any dotfiles and prepare parent directory
if [[ -d "$DOTFILES_PATH" ]] && ! ${continue:-}; then
  _q "🗂 Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n]" "PROMPT_REPLY"
  [[ "${PROMPT_REPLY:-Y}" =~ ^[Yy] ]] && create_dotfiles_dir "$DOTFILES_PATH"
fi

Fixed code:

# Backup if currently there are any dotfiles and prepare parent directory
if [[ -d "$DOTFILES_PATH" ]] && ! ${continue:-}; then
  _q "🗂 Your DOTFILES_PATH is not empty. Do you want to do a backup first? [Y/n]" "PROMPT_REPLY"
  [[ "${PROMPT_REPLY:-Y}" =~ ^[Yy] ]] && backup_dotfiles_dir "$DOTFILES_PATH"
fi
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

No branches or pull requests

1 participant