mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +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
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue