Skip to content

Commit

Permalink
fix: reverse items on snapshot selector
Browse files Browse the repository at this point in the history
update: dependencies
  • Loading branch information
alvaro17f committed Feb 28, 2024
1 parent 03f7e60 commit 4496d06
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 42 deletions.
73 changes: 40 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wrestic"
version = "1.5.0"
version = "1.5.1"
authors = ["alvaro17f"]
description = "Restic wrapper built in Rust"
homepage = "https://wrestic.com/"
Expand All @@ -10,20 +10,20 @@ edition = "2021"
keywords = ["restic", "wrapper", "rust", "backup", "tool"]

[dependencies]
anyhow = "1.0.79"
clap = { version = "4.4.18", features = ["derive"] }
clap_complete = "4.4.7"
anyhow = "1.0.80"
clap = { version = "4.5.1", features = ["derive"] }
clap_complete = "4.5.1"
cmd_lib = "1.9.3"
color-print = "0.3.5"
config = "0.13.4"
dialoguer = "0.11.0"
flate2 = "1.0.28"
indicatif = "0.17.7"
indicatif = "0.17.8"
lazy_static = "1.4.0"
nix = { version = "0.27.1", features = ["user"] }
regex = "1.10.2"
serde = "1.0.195"
serde_json = "1.0.111"
nix = { version = "0.28.0", features = ["user"] }
regex = "1.10.3"
serde = "1.0.197"
serde_json = "1.0.114"
sudo = "0.6.0"
tar = "0.4.40"
which = "6.0.0"
3 changes: 3 additions & 0 deletions src/utils/snapshots_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ pub fn snapshots_selector(backend: &str, repository: &str) -> Result<String> {
let selection = Regex::new(r"(\w+)\s+(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})")?
.captures_iter(&restic)
.map(|cap| (cap[1]).to_string())
.collect::<Vec<String>>()
.into_iter()
.rev()
.collect::<Vec<String>>()[selection]
.to_owned();

Expand Down

0 comments on commit 4496d06

Please sign in to comment.