fix(fermata): a path call's leading ~/ is expanded, so Grep with path ~/.ssh/id_rsa meets the gate
This commit is contained in:
@@ -466,15 +466,6 @@ fn a_comment_or_an_attribute_line_beside_a_certificate_passes() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Only `~` in a command is expanded. In Grep's `path` it stays text, so the file is not found.
|
||||
#[test]
|
||||
fn a_tilde_in_a_greps_path_is_not_expanded() {
|
||||
let p = project(&[]);
|
||||
put(p.home.path(), &[(".ssh/id_rsa", b"fake key text\n")]);
|
||||
assert!(denied(&p.pre("Grep", json!({"pattern": "x", "path": p.home.path().join(".ssh/id_rsa")}))), "control");
|
||||
assert!(passes(&p.pre("Grep", json!({"pattern": "x", "path": "~/.ssh/id_rsa"}))));
|
||||
}
|
||||
|
||||
/// The default list names `terraform.tfvars` and `*.auto.tfvars`, no other `*.tfvars`.
|
||||
#[test]
|
||||
fn a_tfvars_file_off_the_list_is_not_masked() {
|
||||
|
||||
Reference in New Issue
Block a user