Skip to content

Commit 59ee1a7

Browse files
committed
build: warning
1 parent 8a528ef commit 59ee1a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
use git2::{DescribeFormatOptions, DescribeOptions, Repository};
22

33
fn main() {
4-
let Ok(repo) = Repository::open(".") else {
4+
let Ok(repo) = Repository::open(".").map_err(|e| {
5+
println!("cargo::warning={}", e);
6+
e
7+
}) else {
58
return;
69
};
710
let Ok(git_describe_result) = repo
@@ -16,6 +19,9 @@ fn main() {
1619
.always_use_long_format(true)
1720
.dirty_suffix("-dirty"),
1821
))
22+
}).map_err(|e| {
23+
println!("cargo::warning={}", e);
24+
e
1925
})
2026
else {
2127
return;

0 commit comments

Comments
 (0)