License and license related flags #1

Merged
cafkafk merged 13 commits from dev into main 2023-06-09 18:36:30 +02:00
2 changed files with 10 additions and 9 deletions
Showing only changes of commit c38b524e09 - Show all commits

View file

@ -29,7 +29,7 @@ const CONFIG_FILE: &str = "/.config/gg/config.yaml";
long_version=env!("CARGO_PKG_VERSION"),
about="GitOps for the masses",
long_about="A Rust GitOps and linkfarm orchestrator inspired by GNU Stow",
subcommand_required=true,
subcommand_required=false,
arg_required_else_help=true,
help_template="\
{before-help}{name} {version}
@ -59,7 +59,7 @@ pub struct Args {
pub code_of_conduct: bool,
#[command(subcommand)]
pub command: Commands,
pub command: Option<Commands>,
}
#[derive(Subcommand, Debug)]

View file

@ -42,27 +42,28 @@ fn main() {
_ => (),
}
match &args.command {
Commands::Link { msg: _ } => {
Some(Commands::Link { msg: _ }) => {
config.link_all();
}
Commands::Quick { msg } => {
Some(Commands::Quick { msg }) => {
config.quick(&msg.as_ref().unwrap());
}
Commands::Clone { msg: _ } => {
Some(Commands::Clone { msg: _ }) => {
config.clone_all();
}
Commands::Pull { msg: _ } => {
Some(Commands::Pull { msg: _ }) => {
config.pull_all();
}
Commands::Add { msg: _ } => {
Some(Commands::Add { msg: _ }) => {
config.add_all();
}
Commands::Commit { msg: _ } => {
Some(Commands::Commit { msg: _ }) => {
config.commit_all();
}
Commands::CommitMsg { msg } => {
Some(Commands::CommitMsg { msg }) => {
config.commit_all_msg(&msg.as_ref().unwrap());
}
None => (),
}
trace!("{:?}", config);
}