Skip to content

Commit 8c12c57

Browse files
authored
fix(hotfix): build info unknown (#145)
1 parent 4bd8ea7 commit 8c12c57

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/lib.rs

+4-9
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,10 @@ pub async fn bootstap(mut shutdown: broadcast::Receiver<()>, config: Config) ->
138138
let port = state.config.port;
139139
let private_port = state.config.telemetry_prometheus_port.unwrap_or(3001);
140140
let build_version = state.build_info.crate_info.version.clone();
141-
let build_commit = state
142-
.build_info
143-
.version_control
144-
.clone()
145-
.unwrap()
146-
.git()
147-
.unwrap()
148-
.commit_short_id
149-
.clone();
141+
let build_commit = match state.build_info.version_control.clone() {
142+
Some(v) => v.git().unwrap().commit_short_id.clone(),
143+
None => "unknown-commit".to_string(),
144+
};
150145
let build_rustc_version = state.build_info.compiler.version.clone();
151146
let show_header = !state.config.disable_header;
152147
// TODO use value again

0 commit comments

Comments
 (0)