Be more careful about restoring backups (fix #509)

pull/512/head
Stephen M. Coakley 7 years ago
parent bc8f3142f1
commit 5eb63f5dfc
No known key found for this signature in database
GPG Key ID: 91B59C18494C4FC0

@ -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

@ -1 +1 @@
f2e24da717a9399ebb6a2e78f16627b99b6a0c31aba9123542472de94d9d6da6 install
92ca680df48640e744b361d376194c5f5f8d6b4f1ac775d22417a0d8a8108767 install

Loading…
Cancel
Save