mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
fix: add date to the version string on Mac
It doesn't support `--iso`
This commit is contained in:
parent
869ec5f97a
commit
4f9640ff39
@ -55,7 +55,7 @@ fn commit_hash() -> Option<String> {
|
||||
}
|
||||
|
||||
fn build_date() -> Option<String> {
|
||||
output_to_string("date --iso --utc")
|
||||
output_to_string("date --utc +%Y-%m-%d")
|
||||
}
|
||||
|
||||
fn output_to_string(command: &str) -> Option<String> {
|
||||
|
@ -108,7 +108,7 @@ fn run_fuzzer() -> Result<()> {
|
||||
}
|
||||
|
||||
fn date_iso() -> Result<String> {
|
||||
let res = cmd!("date --iso --utc").read()?;
|
||||
let res = cmd!("date --utc +%Y-%m-%d").read()?;
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user