cob: panic on badly formatted debug env var

Panic to clear to the operator something is wrong.  Panic'ing like this
is ok in debug mode, but must be avoided in production.

Signed-off-by: Slack Coder <slackcoder@server.ky>
This commit is contained in:
Slack Coder 2022-12-20 08:25:43 -05:00 committed by Alexis Sellier
parent 6b67e0571e
commit 873ce895ae
No known key found for this signature in database
1 changed files with 2 additions and 4 deletions

View File

@ -247,10 +247,8 @@ where
#[cfg(debug_assertions)]
if let Ok(s) = std::env::var(git::RAD_COMMIT_TIME) {
if let Ok(v) = s.trim().parse::<i64>() {
author.time = git_commit::author::Time::new(v, 0);
timestamp = v;
}
timestamp = s.trim().parse::<i64>().unwrap();
author.time = git_commit::author::Time::new(timestamp, 0);
}
let oid = Commit::new(