aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2021-10-30 21:09:56 +0100
committerGitHub <[email protected]>2021-10-30 21:09:56 +0100
commit89daa500b322f98436abb09a80c1a4e0b3c96a2e (patch)
treeee905efee3761f2cf3f8efdae52d159f25b2511d
parent450ec8fbae076543d8ccc2d363613f0ae778a01d (diff)
parent3b4b9aa6bc041f1e24761e94b1c052ad20f9ca66 (diff)
Merge pull request #11 from diogo464/dependabot/cargo/clap-3.0.0-beta.5
Bump clap from 3.0.0-beta.2 to 3.0.0-beta.5
-rw-r--r--Cargo.lock45
-rw-r--r--dotup_cli/Cargo.toml2
-rw-r--r--dotup_cli/src/commands/init.rs3
-rw-r--r--dotup_cli/src/commands/install.rs5
-rw-r--r--dotup_cli/src/commands/link.rs3
-rw-r--r--dotup_cli/src/commands/uninstall.rs5
-rw-r--r--dotup_cli/src/commands/unlink.rs3
-rw-r--r--dotup_cli/src/main.rs9
8 files changed, 37 insertions, 38 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2e4546f..5ebbfbc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -94,9 +94,9 @@ dependencies = [
94 94
95[[package]] 95[[package]]
96name = "clap" 96name = "clap"
97version = "3.0.0-beta.2" 97version = "3.0.0-beta.5"
98source = "registry+https://github.com/rust-lang/crates.io-index" 98source = "registry+https://github.com/rust-lang/crates.io-index"
99checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" 99checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63"
100dependencies = [ 100dependencies = [
101 "atty", 101 "atty",
102 "bitflags", 102 "bitflags",
@@ -107,15 +107,14 @@ dependencies = [
107 "strsim", 107 "strsim",
108 "termcolor", 108 "termcolor",
109 "textwrap", 109 "textwrap",
110 "unicode-width", 110 "unicase",
111 "vec_map",
112] 111]
113 112
114[[package]] 113[[package]]
115name = "clap_derive" 114name = "clap_derive"
116version = "3.0.0-beta.2" 115version = "3.0.0-beta.5"
117source = "registry+https://github.com/rust-lang/crates.io-index" 116source = "registry+https://github.com/rust-lang/crates.io-index"
118checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" 117checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3"
119dependencies = [ 118dependencies = [
120 "heck", 119 "heck",
121 "proc-macro-error", 120 "proc-macro-error",
@@ -292,9 +291,12 @@ dependencies = [
292 291
293[[package]] 292[[package]]
294name = "os_str_bytes" 293name = "os_str_bytes"
295version = "2.4.0" 294version = "4.2.0"
296source = "registry+https://github.com/rust-lang/crates.io-index" 295source = "registry+https://github.com/rust-lang/crates.io-index"
297checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" 296checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
297dependencies = [
298 "memchr",
299]
298 300
299[[package]] 301[[package]]
300name = "ppv-lite86" 302name = "ppv-lite86"
@@ -355,9 +357,9 @@ dependencies = [
355 357
356[[package]] 358[[package]]
357name = "proc-macro2" 359name = "proc-macro2"
358version = "1.0.27" 360version = "1.0.32"
359source = "registry+https://github.com/rust-lang/crates.io-index" 361source = "registry+https://github.com/rust-lang/crates.io-index"
360checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" 362checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43"
361dependencies = [ 363dependencies = [
362 "unicode-xid", 364 "unicode-xid",
363] 365]
@@ -495,9 +497,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
495 497
496[[package]] 498[[package]]
497name = "syn" 499name = "syn"
498version = "1.0.73" 500version = "1.0.81"
499source = "registry+https://github.com/rust-lang/crates.io-index" 501source = "registry+https://github.com/rust-lang/crates.io-index"
500checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" 502checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966"
501dependencies = [ 503dependencies = [
502 "proc-macro2", 504 "proc-macro2",
503 "quote", 505 "quote",
@@ -529,9 +531,9 @@ dependencies = [
529 531
530[[package]] 532[[package]]
531name = "textwrap" 533name = "textwrap"
532version = "0.12.1" 534version = "0.14.2"
533source = "registry+https://github.com/rust-lang/crates.io-index" 535source = "registry+https://github.com/rust-lang/crates.io-index"
534checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" 536checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
535dependencies = [ 537dependencies = [
536 "unicode-width", 538 "unicode-width",
537] 539]
@@ -572,6 +574,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
572checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" 574checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
573 575
574[[package]] 576[[package]]
577name = "unicase"
578version = "2.6.0"
579source = "registry+https://github.com/rust-lang/crates.io-index"
580checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
581dependencies = [
582 "version_check",
583]
584
585[[package]]
575name = "unicode-segmentation" 586name = "unicode-segmentation"
576version = "1.8.0" 587version = "1.8.0"
577source = "registry+https://github.com/rust-lang/crates.io-index" 588source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -590,12 +601,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
590checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 601checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
591 602
592[[package]] 603[[package]]
593name = "vec_map"
594version = "0.8.2"
595source = "registry+https://github.com/rust-lang/crates.io-index"
596checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
597
598[[package]]
599name = "version_check" 604name = "version_check"
600version = "0.9.3" 605version = "0.9.3"
601source = "registry+https://github.com/rust-lang/crates.io-index" 606source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/dotup_cli/Cargo.toml b/dotup_cli/Cargo.toml
index d2ece5a..f0ac22a 100644
--- a/dotup_cli/Cargo.toml
+++ b/dotup_cli/Cargo.toml
@@ -10,7 +10,7 @@ doc = false
10 10
11[dependencies] 11[dependencies]
12anyhow = "1.0" 12anyhow = "1.0"
13clap = "3.0.0-beta.2" 13clap = "3.0.0-beta.5"
14log = "0.4" 14log = "0.4"
15 15
16[dependencies.dotup] 16[dependencies.dotup]
diff --git a/dotup_cli/src/commands/init.rs b/dotup_cli/src/commands/init.rs
index b894924..45129bf 100644
--- a/dotup_cli/src/commands/init.rs
+++ b/dotup_cli/src/commands/init.rs
@@ -4,8 +4,7 @@ use super::prelude::*;
4/// 4///
5/// By default this will create the file in the current directory 5/// By default this will create the file in the current directory
6/// but the --depot flag can be used to change this path. 6/// but the --depot flag can be used to change this path.
7#[derive(Clap)] 7#[derive(Parser)]
8#[clap(setting = AppSettings::ColoredHelp)]
9pub struct Opts {} 8pub struct Opts {}
10 9
11pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { 10pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> {
diff --git a/dotup_cli/src/commands/install.rs b/dotup_cli/src/commands/install.rs
index b56c5f7..e166a7b 100644
--- a/dotup_cli/src/commands/install.rs
+++ b/dotup_cli/src/commands/install.rs
@@ -6,8 +6,7 @@ use super::prelude::*;
6/// 6///
7/// Installing a link will create the necessary directories. 7/// Installing a link will create the necessary directories.
8/// If a file or directory already exists at the location a link would be installed this command will fail. 8/// If a file or directory already exists at the location a link would be installed this command will fail.
9#[derive(Clap)] 9#[derive(Parser)]
10#[clap(setting = AppSettings::ColoredHelp)]
11pub struct Opts { 10pub struct Opts {
12 /// The location where links will be installed to. 11 /// The location where links will be installed to.
13 /// Defaults to the home directory. 12 /// Defaults to the home directory.
@@ -15,7 +14,7 @@ pub struct Opts {
15 install_base: Option<PathBuf>, 14 install_base: Option<PathBuf>,
16 15
17 /// The files/directories to install. 16 /// The files/directories to install.
18 #[clap(required = true, min_values = 1, default_value = ".")] 17 #[clap(min_values = 1, default_value = ".")]
19 paths: Vec<PathBuf>, 18 paths: Vec<PathBuf>,
20} 19}
21 20
diff --git a/dotup_cli/src/commands/link.rs b/dotup_cli/src/commands/link.rs
index 66194e1..d1f61ea 100644
--- a/dotup_cli/src/commands/link.rs
+++ b/dotup_cli/src/commands/link.rs
@@ -10,8 +10,7 @@ use super::prelude::*;
10/// If a link is created for a file that already had a link then the old link will be overwritten. 10/// If a link is created for a file that already had a link then the old link will be overwritten.
11/// By default creating a link to a directory will recursively link all files under that 11/// By default creating a link to a directory will recursively link all files under that
12/// directory, to actually link a directory use the --directory flag. 12/// directory, to actually link a directory use the --directory flag.
13#[derive(Clap)] 13#[derive(Parser)]
14#[clap(setting = AppSettings::ColoredHelp)]
15pub struct Opts { 14pub struct Opts {
16 /// Treats the paths as directories. This will create links to the actual directories instead 15 /// Treats the paths as directories. This will create links to the actual directories instead
17 /// of recursively linking all files under them. 16 /// of recursively linking all files under them.
diff --git a/dotup_cli/src/commands/uninstall.rs b/dotup_cli/src/commands/uninstall.rs
index a81d5e4..fdb1a0a 100644
--- a/dotup_cli/src/commands/uninstall.rs
+++ b/dotup_cli/src/commands/uninstall.rs
@@ -7,8 +7,7 @@ use super::prelude::*;
7/// Uninstalling a link for a file that didnt have a link will do nothing. 7/// Uninstalling a link for a file that didnt have a link will do nothing.
8/// Uninstalling a directory will recursively uninstall all files under it. 8/// Uninstalling a directory will recursively uninstall all files under it.
9/// Symlinks are only deleted if they were pointing to the correct file. 9/// Symlinks are only deleted if they were pointing to the correct file.
10#[derive(Clap)] 10#[derive(Parser)]
11#[clap(setting = AppSettings::ColoredHelp)]
12pub struct Opts { 11pub struct Opts {
13 /// The location where links will be uninstalled from. 12 /// The location where links will be uninstalled from.
14 /// Defaults to home directory. 13 /// Defaults to home directory.
@@ -16,7 +15,7 @@ pub struct Opts {
16 install_base: Option<PathBuf>, 15 install_base: Option<PathBuf>,
17 16
18 /// The files/directories to uninstall. 17 /// The files/directories to uninstall.
19 #[clap(required = true, min_values = 1, default_value = ".")] 18 #[clap(min_values = 1, default_value = ".")]
20 paths: Vec<PathBuf>, 19 paths: Vec<PathBuf>,
21} 20}
22 21
diff --git a/dotup_cli/src/commands/unlink.rs b/dotup_cli/src/commands/unlink.rs
index f33fe60..abe23e3 100644
--- a/dotup_cli/src/commands/unlink.rs
+++ b/dotup_cli/src/commands/unlink.rs
@@ -10,8 +10,7 @@ use super::prelude::*;
10/// This will recursively remove links. If a path is a directory then it will remove all links 10/// This will recursively remove links. If a path is a directory then it will remove all links
11/// recursively. 11/// recursively.
12/// The links are not uninstall by default, see the --uninstall parameter. 12/// The links are not uninstall by default, see the --uninstall parameter.
13#[derive(Clap)] 13#[derive(Parser)]
14#[clap(setting = AppSettings::ColoredHelp)]
15pub struct Opts { 14pub struct Opts {
16 /// Specify the install base if the links are also to be uninstalled. 15 /// Specify the install base if the links are also to be uninstalled.
17 #[clap(long)] 16 #[clap(long)]
diff --git a/dotup_cli/src/main.rs b/dotup_cli/src/main.rs
index d500a7d..5f02e68 100644
--- a/dotup_cli/src/main.rs
+++ b/dotup_cli/src/main.rs
@@ -8,11 +8,11 @@ pub use config::Config;
8 8
9pub mod prelude { 9pub mod prelude {
10 pub use super::{utils, Config}; 10 pub use super::{utils, Config};
11 pub use clap::{AppSettings, Clap}; 11 pub use clap::{AppSettings, Parser};
12 pub use dotup::{Archive, Depot, DepotConfig, Link, LinkCreateParams, LinkID}; 12 pub use dotup::{Archive, Depot, DepotConfig, Link, LinkCreateParams, LinkID};
13} 13}
14 14
15use clap::{AppSettings, Clap}; 15use clap::{AppSettings, Parser};
16use flexi_logger::Logger; 16use flexi_logger::Logger;
17use std::{ 17use std::{
18 collections::HashMap, 18 collections::HashMap,
@@ -22,8 +22,7 @@ use std::{
22 22
23use prelude::*; 23use prelude::*;
24 24
25#[derive(Clap)] 25#[derive(Parser)]
26#[clap(setting = AppSettings::ColoredHelp)]
27struct Opts { 26struct Opts {
28 /// Path to the depot file. 27 /// Path to the depot file.
29 /// 28 ///
@@ -50,7 +49,7 @@ struct Opts {
50 subcmd: SubCommand, 49 subcmd: SubCommand,
51} 50}
52 51
53#[derive(Clap)] 52#[derive(Parser)]
54enum SubCommand { 53enum SubCommand {
55 Init(commands::init::Opts), 54 Init(commands::init::Opts),
56 Link(commands::link::Opts), 55 Link(commands::link::Opts),