Skip to content

Commit 7315f6d

Browse files
authored
Add fallback if unable to get git commit (#531)
Specifies the fallback option on the `git_version!` macro, as written in the docs for git-version-macro crate.
1 parent 500ee61 commit 7315f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xet_logging/src/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub fn init(cfg: LoggingConfig) {
4848
}
4949

5050
// Log the version information.
51-
info!("{}, xet-core revision {}", &cfg.version, git_version::git_version!());
51+
info!("{}, xet-core revision {}", &cfg.version, git_version::git_version!(fallback = "unknown"));
5252

5353
if let Some(dir_cleanup_task_fn) = dir_cleanup_task {
5454
dir_cleanup_task_fn();

0 commit comments

Comments
 (0)