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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user