Skip to content

Commit 4f9640f

Browse files
committed
fix: add date to the version string on Mac
It doesn't support `--iso`
1 parent 869ec5f commit 4f9640f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/rust-analyzer/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn commit_hash() -> Option<String> {
5555
}
5656

5757
fn build_date() -> Option<String> {
58-
output_to_string("date --iso --utc")
58+
output_to_string("date --utc +%Y-%m-%d")
5959
}
6060

6161
fn output_to_string(command: &str) -> Option<String> {

xtask/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fn run_fuzzer() -> Result<()> {
108108
}
109109

110110
fn date_iso() -> Result<String> {
111-
let res = cmd!("date --iso --utc").read()?;
111+
let res = cmd!("date --utc +%Y-%m-%d").read()?;
112112
Ok(res)
113113
}
114114

0 commit comments

Comments
 (0)