Skip to content

Commit

Permalink
change the default back to the help command
Browse files Browse the repository at this point in the history
  • Loading branch information
timopruesse committed Apr 8, 2022
1 parent 104f7e5 commit 52e0c4d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "machine_setup"
version = "0.2.5"
version = "0.2.6"
edition = "2021"
authors = ["Timo Prüße <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand Down
7 changes: 3 additions & 4 deletions src/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl FromStr for SubCommand {
struct Args {
/// what should be done?
#[clap(subcommand)]
command: Option<SubCommand>,
command: SubCommand,

/// path to the config file
#[clap(short, long, default_value = "./machine_setup.yaml")]
Expand Down Expand Up @@ -84,11 +84,10 @@ pub fn execute_command() {
}

let task_list = config.unwrap();
let subcommand = args.command.unwrap_or(SubCommand::Install);

match subcommand {
match args.command {
SubCommand::Install | SubCommand::Uninstall | SubCommand::Update => {
let mode = get_task_runner_mode(subcommand);
let mode = get_task_runner_mode(args.command);
let run = task_runner::run(task_list, mode, args.task);

if run.is_err() {
Expand Down

0 comments on commit 52e0c4d

Please sign in to comment.