show help menu when no input

This commit is contained in:
Waradu 2024-10-19 23:28:59 +02:00
parent e79191cb5f
commit 591930bdef
No known key found for this signature in database
GPG key ID: F85AAC8BA8B8DAAD
3 changed files with 4 additions and 4 deletions

2
Cargo.lock generated
View file

@ -1306,7 +1306,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "to-streamshare"
version = "0.2.1"
version = "0.2.2"
dependencies = [
"clap",
"streamshare",

View file

@ -1,6 +1,6 @@
[package]
name = "to-streamshare"
version = "0.2.1"
version = "0.2.2"
edition = "2021"
description = "Upload to streamshare (to-ss > toss) from the terminal"
license = "MIT"

View file

@ -1,4 +1,4 @@
use clap::Parser;
use clap::{CommandFactory, Parser};
use streamshare::upload;
#[derive(Parser, Debug)]
@ -44,7 +44,7 @@ async fn main() {
Err(e) => eprintln!("Error: {}", e),
}
} else {
eprintln!("Please provide a file path or use --delete");
Args::command().print_help().unwrap();
}
}