From b0bbc3208754c41f0d9f522efd6695acd4050460 Mon Sep 17 00:00:00 2001 From: Max Rukomoynikov Date: Sun, 6 Oct 2024 16:48:19 +0100 Subject: [PATCH] Make Rails arguments optional Calling rails-new without any arguments fails with error: (error: the following required arguments were not provided: ..). Making rails arguments optional allows to simply run rails-new and see what params are required for scaffolding new rails application (for example app name). --- src/rails_new.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rails_new.rs b/src/rails_new.rs index 19d3fa0..1a3b9fa 100644 --- a/src/rails_new.rs +++ b/src/rails_new.rs @@ -3,7 +3,7 @@ use clap::{Parser, Subcommand}; #[derive(Parser)] #[command(version, about, long_about = None, subcommand_negates_reqs = true)] pub struct Cli { - #[clap(trailing_var_arg = true, required = true)] + #[clap(trailing_var_arg = true)] /// arguments passed to `rails new` pub args: Vec, #[clap(long, short = 'u', default_value = "3.3.4")]