Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
revert: accidental removal of help
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Jul 8, 2023
1 parent 0af9b3d commit ca20896
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion huff_cli/src/huffc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub(crate) fn get_input(prompt: &str) -> String {

fn main() {
// Into App
let app: App = Huff::into_app();
let mut app: App = Huff::into_app();

// Parse the command line arguments
let mut cli = Huff::parse();
Expand All @@ -147,6 +147,13 @@ fn main() {
Compiler::init_tracing_subscriber(Some(vec![tracing::Level::DEBUG.into()]));
}

// Check if no argument is provided
if cli.path.is_none() {
// Print help and exit
app.print_help().unwrap();
return
}

// Create compiler from the Huff Args
let sources: Arc<Vec<String>> = match cli.get_inputs() {
Ok(s) => Arc::new(s),
Expand Down

0 comments on commit ca20896

Please sign in to comment.