We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4601892 commit db60ac3Copy full SHA for db60ac3
git2-hooks/src/lib.rs
@@ -428,6 +428,12 @@ exit 1
428
429
#[test]
430
fn test_env_containing_path() {
431
+ const PATH_EXPORT: &str = if cfg!(windows) {
432
+ "declare -x PATH="
433
+ } else {
434
+ "export PATH"
435
+ };
436
+
437
let (_td, repo) = repo_init();
438
439
let hook = b"#!/bin/sh
@@ -445,8 +451,8 @@ exit 1
445
451
assert!(
446
452
stdout
447
453
.lines()
448
- .any(|line| line.starts_with("export PATH")),
449
- "{stdout:?}"
454
+ .any(|line| line.starts_with(PATH_EXPORT)),
455
+ "Could not find line starting with {PATH_EXPORT:?} in: {stdout:?}"
450
456
);
457
}
458
0 commit comments