diff --git a/crates/aiken/Cargo.toml b/crates/aiken/Cargo.toml index 6c743cca..0456b151 100644 --- a/crates/aiken/Cargo.toml +++ b/crates/aiken/Cargo.toml @@ -7,9 +7,9 @@ repository = "https://github.com/aiken-lang/aiken" homepage = "https://github.com/aiken-lang/aiken" license = "Apache-2.0" authors = [ - "Lucas Rosa ", - "Kasey White ", - "KtorZ ", + "Lucas Rosa ", + "Kasey White ", + "KtorZ ", ] rust-version = "1.70.0" @@ -21,10 +21,10 @@ eula = false [dependencies] clap = { version = "4.1.8", features = [ - "derive", - "wrap_help", - "unicode", - "string", + "derive", + "wrap_help", + "unicode", + "string", ] } hex = "0.4.3" ignore = "0.4.20" @@ -45,4 +45,6 @@ inquire = "0.6.2" num-bigint = "0.4.3" ordinal = "0.3.2" rand = "0.8.5" + +[target.'cfg(not(windows))'.dependencies] xdg = "2.5.2" diff --git a/crates/aiken/src/cmd/mod.rs b/crates/aiken/src/cmd/mod.rs index 67de99b6..057c676e 100644 --- a/crates/aiken/src/cmd/mod.rs +++ b/crates/aiken/src/cmd/mod.rs @@ -4,6 +4,8 @@ use clap::Parser; pub mod blueprint; pub mod build; pub mod check; +// only windows +#[cfg(not(target_os = "windows"))] pub mod completion; pub mod docs; pub mod export; @@ -45,6 +47,7 @@ pub enum Cmd { #[clap(subcommand)] Uplc(uplc::Cmd), + #[cfg(not(target_os = "windows"))] #[clap(subcommand)] Completion(completion::Cmd), diff --git a/crates/aiken/src/main.rs b/crates/aiken/src/main.rs index 4a2a94f8..7b60994c 100644 --- a/crates/aiken/src/main.rs +++ b/crates/aiken/src/main.rs @@ -1,10 +1,14 @@ use aiken_project::{config, pretty}; use cmd::{ blueprint::{self, address}, - build, check, completion, docs, export, fmt, lsp, new, + build, check, docs, export, fmt, lsp, new, packages::{self, add}, tx, uplc, Cmd, }; + +#[cfg(not(target_os = "windows"))] +use cmd::completion; + use owo_colors::OwoColorize; mod cmd; @@ -25,6 +29,7 @@ fn main() -> miette::Result<()> { Cmd::Lsp(args) => lsp::exec(args), Cmd::Tx(sub_cmd) => tx::exec(sub_cmd), Cmd::Uplc(sub_cmd) => uplc::exec(sub_cmd), + #[cfg(not(target_os = "windows"))] Cmd::Completion(sub_cmd) => completion::exec(sub_cmd), Cmd::Export(args) => export::exec(args), }