diff --git a/src/main.rs b/src/main.rs index 3e8d207..f518277 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,8 +16,8 @@ fn main() { // read the content of the DOCKERFILE and store it in a variable let dockerfile = include_bytes!("../Dockerfile"); - let ruby_version = cli.ruby_version.unwrap(); - let rails_version = cli.rails_version.unwrap(); + let ruby_version = cli.ruby_version; + let rails_version = cli.rails_version; // Run docker build --build-arg RUBY_VERSION=$RUBY_VERSION --build-arg RAILS_VERSION=$RAILS_VERSION -t rails-new-$RUBY_VERSION-$RAILS_VERSION // passing the content of DOCKERFILE to the command stdin diff --git a/src/rails_new.rs b/src/rails_new.rs index 626dba4..b0ca823 100644 --- a/src/rails_new.rs +++ b/src/rails_new.rs @@ -7,9 +7,9 @@ pub struct Cli { /// arguments passed to `rails new` pub args: Vec, #[clap(long, short = 'u', default_value = "3.2.3")] - pub ruby_version: Option, + pub ruby_version: String, #[clap(long, short = 'r', default_value = "7.1.3")] - pub rails_version: Option, + pub rails_version: String, } #[test]