Commit 5eb63f5d authored by Stephen M. Coakley's avatar Stephen M. Coakley

Be more careful about restoring backups (fix #509)

parent bc8f3142
......@@ -34,7 +34,7 @@ fish install --path=~/.local/share/omf --config=~/.config/omf
You can verify the integrity of the downloaded installer by verifying the script against [this checksum](bin/install.sha256):
```
f2e24da717a9399ebb6a2e78f16627b99b6a0c31aba9123542472de94d9d6da6 install
92ca680df48640e744b361d376194c5f5f8d6b4f1ac775d22417a0d8a8108767 install
```
You can also install Oh My Fish with Git or with an offline source tarball downloaded from the [releases page][releases]:
......
......@@ -373,7 +373,6 @@ function uninstall_omf
end
# Restore backed-up files
restore_backup_file "$FISH_CONFIG/config.fish"
restore_backup_file "$FISH_CONFIG/functions/fish_prompt.fish"
say "Uninstall complete"
......@@ -411,9 +410,13 @@ function restore_backup_file -a file_path
set -l backup_file_path (echo $backup_file_list | command tr ' ' '\n' | command sort -r | command head -1)
if test -e "$backup_file_path"
say "Restoring backup file to $path/$file"
command mv "$backup_file_path" "$path/$file" ^/dev/null
or abort "Could not restore backup $backup_file_path"
say "Found a backup of $file at $backup_file_path"
if confirm "Would you like to restore it (overwrite existing)?"
say "Restoring backup file to $path/$file"
command mv "$backup_file_path" "$path/$file" ^/dev/null
or abort "Could not restore backup $backup_file_path"
end
end
end
......
f2e24da717a9399ebb6a2e78f16627b99b6a0c31aba9123542472de94d9d6da6 install
92ca680df48640e744b361d376194c5f5f8d6b4f1ac775d22417a0d8a8108767 install
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment