mirror of
https://github.com/typst/typst
synced 2025-05-11 19:46:23 +08:00
Fix index out of bounds error in build script (#173)
This commit is contained in:
parent
8b1852cffb
commit
ec3f7004ca
@ -6,7 +6,7 @@ fn main() {
|
||||
.output()
|
||||
.ok()
|
||||
.and_then(|output| output.status.success().then(|| output))
|
||||
.and_then(|output| String::from_utf8(output.stdout[..8].into()).ok())
|
||||
.and_then(|output| String::from_utf8(output.stdout.get(..8)?.into()).ok())
|
||||
.unwrap_or_else(|| "(unknown version)".into());
|
||||
println!("cargo:rustc-env=TYPST_VERSION={version}");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user