diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 4c1af8e..13d95f0 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,7 +1,8 @@ -use clap::{ValueEnum, Parser}; +use clap::{ValueEnum, Parser, AppSettings}; use std::fmt::{Display, Formatter}; #[derive(Parser)] +#[clap(global_setting(AppSettings::AllowLeadingHyphen))] pub struct Input { #[clap(value_enum)] pub cmd: CargoCommand, diff --git a/src/lib.rs b/src/lib.rs index f3a4cd3..0046f5a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,6 +59,8 @@ fn make_cargo_build_command( command.arg("-Z").arg("build-std"); } + println!("{:?}", args); + command .env("RUSTFLAGS", rust_flags) .arg(&cmd.to_string()) diff --git a/src/main.rs b/src/main.rs index 4742229..415b5a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use cargo_3ds::commands::{CargoCommand, Input}; use cargo_3ds::{build_3dsx, build_elf, build_smdh, check_rust_version, get_metadata, link}; -use clap::Parser; +use clap::{Parser}; use std::process; fn main() { @@ -17,8 +17,7 @@ fn main() { true }); - let message_format = if let Some(pos) = input - .cargo_opts + let message_format = if let Some(pos) = input.cargo_opts .iter() .position(|s| s.starts_with("--message-format")) {