Skip to content

Commit

Permalink
Merge branch 'main' into docker-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Jul 26, 2024
2 parents afad358 + a4679a1 commit c3bcaef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions main/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// For licensing, see https://github.com/OffchainLabs/cargo-stylus/blob/main/licenses/COPYRIGHT.md

use cargo_stylus_util::{color::Color, sys};
use clap::Parser;
use clap::{CommandFactory, Parser};
use eyre::{bail, Result};

// Conditional import for Unix-specific `CommandExt`
Expand Down Expand Up @@ -34,7 +34,6 @@ enum Subcommands {
/// Export a Solidity ABI.
ExportAbi,
/// Cache a contract.
#[command(alias = "c")]
Cache,
/// Check a contract.
#[command(alias = "c")]
Expand Down Expand Up @@ -97,14 +96,16 @@ const COMMANDS: &[Binary] = &[
},
];

// prints help message and exits
fn exit_with_help_msg() -> ! {
Opts::parse_from(["--help"]);
unreachable!()
Opts::command().print_help().unwrap();
std::process::exit(0);
}

// prints version information and exits
fn exit_with_version() -> ! {
Opts::parse_from(["--version"]);
unreachable!()
println!("{}", Opts::command().render_version());
std::process::exit(0);
}

fn main() -> Result<()> {
Expand Down

0 comments on commit c3bcaef

Please sign in to comment.