diff --git a/Makefile b/Makefile index 5eb6bc59..9efb3a3a 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ test\:node: cd autocorrect-node && yarn && yarn build && yarn test test\:node\:cli: cd autocorrect-node && yarn && yarn build - cd tests/node-cli-test && yarn upgrade autocorrect-node && yarn autocorrect --lint + cd tests/node-cli-test && yarn upgrade autocorrect-node && yarn autocorrect init test\:python: cd autocorrect-py && python3 -m pip install . && python3 -m pytest test\:ruby: diff --git a/autocorrect-cli/Cargo.toml b/autocorrect-cli/Cargo.toml index 81515a0a..a6823938 100644 --- a/autocorrect-cli/Cargo.toml +++ b/autocorrect-cli/Cargo.toml @@ -28,8 +28,8 @@ walkdir = "2.3.2" # Request features: # - blocking - for blocking request # - rustls-tls - for use native rustls without system openssl dependency -reqwest = {version = "0.11.18", features = ["rustls-tls"], default-features = false, optional = true} -tokio = {version = "1", features = ["macros", "sync", "rt", "rt-multi-thread", "time"], default-features = false, optional = true} +reqwest = {version = "0.11.18", features = ["rustls-tls"], default-features = false} +tokio = {version = "1", features = ["macros", "sync", "rt", "rt-multi-thread", "time"], default-features = false} # Self Update # - archive-tar + compression-flate2 - for tar.gz @@ -38,8 +38,7 @@ self_update = {version = "0.30.0", features = ["archive-tar", "compression-flate sudo = {version = "0.5", optional = true} [features] -default = ["update", "init"] -init = ["reqwest", "tokio"] +default = ["update"] update = ["self_update", "sudo"] [profile.release] diff --git a/autocorrect-cli/src/cli.rs b/autocorrect-cli/src/cli.rs index 4c0680bd..edaa6300 100644 --- a/autocorrect-cli/src/cli.rs +++ b/autocorrect-cli/src/cli.rs @@ -82,7 +82,6 @@ pub(crate) struct Cli { #[derive(Debug, Subcommand, Clone)] pub(crate) enum Commands { - #[cfg(feature = "init")] #[command(name = "init", about = "Initialize AutoCorrect config file.")] Init { #[clap( diff --git a/autocorrect-cli/src/lib.rs b/autocorrect-cli/src/lib.rs index 7b9ac6ad..376ebc2c 100644 --- a/autocorrect-cli/src/lib.rs +++ b/autocorrect-cli/src/lib.rs @@ -8,11 +8,10 @@ use std::path::Path; use std::time::SystemTime; mod cli; +mod initializer; mod logger; mod progress; -#[cfg(feature = "init")] -mod initializer; #[cfg(feature = "update")] mod update; @@ -57,7 +56,6 @@ where } match cli.command { - #[cfg(feature = "init")] Some(cli::Commands::Init { local, force }) => { initializer::run(&cli, &initializer::InitOption { force, local }).await; return;