projects
/
sockgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ecdd70
)
Return error for env vars instead of panic
author
Jacob Casper
<dev@jacobcasper.com>
Sat, 25 Apr 2020 01:59:40 +0000
(20:59 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Sat, 25 Apr 2020 02:54:57 +0000
(21:54 -0500)
src/main.rs
patch
|
blob
|
blame
|
history
diff --git
a/src/main.rs
b/src/main.rs
index
a783233
..
bc758e4
100644
(file)
--- a/
src/main.rs
+++ b/
src/main.rs
@@
-33,9
+33,9
@@
fn main() -> Result<(), Box<dyn error::Error>> {
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!(