From 41621f4730084a148f21f1d70be12a7c9c960bbd Mon Sep 17 00:00:00 2001 From: Jacob Casper Date: Fri, 24 Apr 2020 20:59:40 -0500 Subject: [PATCH] Return error for env vars instead of panic --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index a783233..bc758e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,9 +33,9 @@ fn main() -> Result<(), Box> { let repo = git2::Repository::init_opts(format!("{}.git", repo_name), &opts)?; - let public_user = env::var("USER").unwrap(); - let public_name = env::var("PUBLIC").unwrap(); - let public_path = env::var("PATH").unwrap(); + let public_user = env::var("USER")?; + let public_name = env::var("PUBLIC")?; + let public_path = env::var("PATH")?; repo.remote( &public_name, &format!( -- 2.20.1