gdke/src/versioning.rs

16 lines
367 B
Rust
Raw Normal View History

2024-01-30 20:38:15 +00:00
use std::{
io::{Stdin, Stdout},
path::Path,
process::{Command, Stdio},
};
fn check_gd_ver(exe: Path) -> anyhow::Result<semver::Version> {
assert!(exe.exists());
let stdo = Command::new(exe)
.arg("-V")
.arg("-s")
.arg("random-no-way-a-game-has-this-btw")
.stdout(Stdio::null())
.output()?;
stdo.stdout
}