1
0
mirror of https://github.com/j178/prek.git synced 2026-04-25 02:11:36 +02:00

Skip version_info test if not built in git repository (#1507)

Signed-off-by: qaqland <anguoli@uniontech.com>
This commit is contained in:
An Guoli
2026-01-31 16:59:43 +08:00
committed by GitHub
parent 14726d8bad
commit b1dcb304e9
+4
View File
@@ -2870,6 +2870,10 @@ fn run_with_stdin_closed() {
/// Test `prek --version` outputs version info.
#[test]
fn version_info() {
// skip if not built in the git repository
if option_env!("PREK_COMMIT_HASH").is_none() {
return;
}
let context = TestContext::new();
let filters = context
.filters()