diff options
| author | diogo464 <[email protected]> | 2021-10-30 21:09:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-30 21:09:56 +0100 |
| commit | 89daa500b322f98436abb09a80c1a4e0b3c96a2e (patch) | |
| tree | ee905efee3761f2cf3f8efdae52d159f25b2511d | |
| parent | 450ec8fbae076543d8ccc2d363613f0ae778a01d (diff) | |
| parent | 3b4b9aa6bc041f1e24761e94b1c052ad20f9ca66 (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.lock | 45 | ||||
| -rw-r--r-- | dotup_cli/Cargo.toml | 2 | ||||
| -rw-r--r-- | dotup_cli/src/commands/init.rs | 3 | ||||
| -rw-r--r-- | dotup_cli/src/commands/install.rs | 5 | ||||
| -rw-r--r-- | dotup_cli/src/commands/link.rs | 3 | ||||
| -rw-r--r-- | dotup_cli/src/commands/uninstall.rs | 5 | ||||
| -rw-r--r-- | dotup_cli/src/commands/unlink.rs | 3 | ||||
| -rw-r--r-- | dotup_cli/src/main.rs | 9 |
8 files changed, 37 insertions, 38 deletions
| @@ -94,9 +94,9 @@ dependencies = [ | |||
| 94 | 94 | ||
| 95 | [[package]] | 95 | [[package]] |
| 96 | name = "clap" | 96 | name = "clap" |
| 97 | version = "3.0.0-beta.2" | 97 | version = "3.0.0-beta.5" |
| 98 | source = "registry+https://github.com/rust-lang/crates.io-index" | 98 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 99 | checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142" | 99 | checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63" |
| 100 | dependencies = [ | 100 | dependencies = [ |
| 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]] |
| 115 | name = "clap_derive" | 114 | name = "clap_derive" |
| 116 | version = "3.0.0-beta.2" | 115 | version = "3.0.0-beta.5" |
| 117 | source = "registry+https://github.com/rust-lang/crates.io-index" | 116 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 118 | checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1" | 117 | checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3" |
| 119 | dependencies = [ | 118 | dependencies = [ |
| 120 | "heck", | 119 | "heck", |
| 121 | "proc-macro-error", | 120 | "proc-macro-error", |
| @@ -292,9 +291,12 @@ dependencies = [ | |||
| 292 | 291 | ||
| 293 | [[package]] | 292 | [[package]] |
| 294 | name = "os_str_bytes" | 293 | name = "os_str_bytes" |
| 295 | version = "2.4.0" | 294 | version = "4.2.0" |
| 296 | source = "registry+https://github.com/rust-lang/crates.io-index" | 295 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 297 | checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85" | 296 | checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799" |
| 297 | dependencies = [ | ||
| 298 | "memchr", | ||
| 299 | ] | ||
| 298 | 300 | ||
| 299 | [[package]] | 301 | [[package]] |
| 300 | name = "ppv-lite86" | 302 | name = "ppv-lite86" |
| @@ -355,9 +357,9 @@ dependencies = [ | |||
| 355 | 357 | ||
| 356 | [[package]] | 358 | [[package]] |
| 357 | name = "proc-macro2" | 359 | name = "proc-macro2" |
| 358 | version = "1.0.27" | 360 | version = "1.0.32" |
| 359 | source = "registry+https://github.com/rust-lang/crates.io-index" | 361 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 360 | checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" | 362 | checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" |
| 361 | dependencies = [ | 363 | dependencies = [ |
| 362 | "unicode-xid", | 364 | "unicode-xid", |
| 363 | ] | 365 | ] |
| @@ -495,9 +497,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" | |||
| 495 | 497 | ||
| 496 | [[package]] | 498 | [[package]] |
| 497 | name = "syn" | 499 | name = "syn" |
| 498 | version = "1.0.73" | 500 | version = "1.0.81" |
| 499 | source = "registry+https://github.com/rust-lang/crates.io-index" | 501 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 500 | checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" | 502 | checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" |
| 501 | dependencies = [ | 503 | dependencies = [ |
| 502 | "proc-macro2", | 504 | "proc-macro2", |
| 503 | "quote", | 505 | "quote", |
| @@ -529,9 +531,9 @@ dependencies = [ | |||
| 529 | 531 | ||
| 530 | [[package]] | 532 | [[package]] |
| 531 | name = "textwrap" | 533 | name = "textwrap" |
| 532 | version = "0.12.1" | 534 | version = "0.14.2" |
| 533 | source = "registry+https://github.com/rust-lang/crates.io-index" | 535 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| 534 | checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789" | 536 | checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" |
| 535 | dependencies = [ | 537 | dependencies = [ |
| 536 | "unicode-width", | 538 | "unicode-width", |
| 537 | ] | 539 | ] |
| @@ -572,6 +574,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
| 572 | checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" | 574 | checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" |
| 573 | 575 | ||
| 574 | [[package]] | 576 | [[package]] |
| 577 | name = "unicase" | ||
| 578 | version = "2.6.0" | ||
| 579 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| 580 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" | ||
| 581 | dependencies = [ | ||
| 582 | "version_check", | ||
| 583 | ] | ||
| 584 | |||
| 585 | [[package]] | ||
| 575 | name = "unicode-segmentation" | 586 | name = "unicode-segmentation" |
| 576 | version = "1.8.0" | 587 | version = "1.8.0" |
| 577 | source = "registry+https://github.com/rust-lang/crates.io-index" | 588 | source = "registry+https://github.com/rust-lang/crates.io-index" |
| @@ -590,12 +601,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | |||
| 590 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" | 601 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" |
| 591 | 602 | ||
| 592 | [[package]] | 603 | [[package]] |
| 593 | name = "vec_map" | ||
| 594 | version = "0.8.2" | ||
| 595 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| 596 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" | ||
| 597 | |||
| 598 | [[package]] | ||
| 599 | name = "version_check" | 604 | name = "version_check" |
| 600 | version = "0.9.3" | 605 | version = "0.9.3" |
| 601 | source = "registry+https://github.com/rust-lang/crates.io-index" | 606 | source = "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] |
| 12 | anyhow = "1.0" | 12 | anyhow = "1.0" |
| 13 | clap = "3.0.0-beta.2" | 13 | clap = "3.0.0-beta.5" |
| 14 | log = "0.4" | 14 | log = "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)] | ||
| 9 | pub struct Opts {} | 8 | pub struct Opts {} |
| 10 | 9 | ||
| 11 | pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { | 10 | pub 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)] | ||
| 11 | pub struct Opts { | 10 | pub 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)] | ||
| 15 | pub struct Opts { | 14 | pub 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)] | ||
| 12 | pub struct Opts { | 11 | pub 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)] | ||
| 15 | pub struct Opts { | 14 | pub 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 | ||
| 9 | pub mod prelude { | 9 | pub 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 | ||
| 15 | use clap::{AppSettings, Clap}; | 15 | use clap::{AppSettings, Parser}; |
| 16 | use flexi_logger::Logger; | 16 | use flexi_logger::Logger; |
| 17 | use std::{ | 17 | use std::{ |
| 18 | collections::HashMap, | 18 | collections::HashMap, |
| @@ -22,8 +22,7 @@ use std::{ | |||
| 22 | 22 | ||
| 23 | use prelude::*; | 23 | use prelude::*; |
| 24 | 24 | ||
| 25 | #[derive(Clap)] | 25 | #[derive(Parser)] |
| 26 | #[clap(setting = AppSettings::ColoredHelp)] | ||
| 27 | struct Opts { | 26 | struct 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)] |
| 54 | enum SubCommand { | 53 | enum SubCommand { |
| 55 | Init(commands::init::Opts), | 54 | Init(commands::init::Opts), |
| 56 | Link(commands::link::Opts), | 55 | Link(commands::link::Opts), |
