From 471dcbfcd865d004789e9bdcff70d84a72448b83 Mon Sep 17 00:00:00 2001 From: Elad Kaplan Date: Fri, 6 Mar 2026 08:14:14 +0200 Subject: [PATCH] fix: exclude >/dev/null from fs:flush_file_content check --- shellfirm/checks/fs.yaml | 2 ++ shellfirm/tests/checks/fs.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/shellfirm/checks/fs.yaml b/shellfirm/checks/fs.yaml index 08091b4..0050936 100644 --- a/shellfirm/checks/fs.yaml +++ b/shellfirm/checks/fs.yaml @@ -24,6 +24,8 @@ filters: - type: PathExists value: 1 + - type: NotContains + value: ">/dev/null" - from: fs test: chmod\s{1,}(?:\S+\s+)*(?:-[a-zA-Z]*R[a-zA-Z]*|--recursive)\s+(?:\S+\s+)*(\*|\.{1,}|/) description: "Change permission to all root files can brake your some thinks like SSH keys." diff --git a/shellfirm/tests/checks/fs.yaml b/shellfirm/tests/checks/fs.yaml index dcdb7d7..504f9e2 100644 --- a/shellfirm/tests/checks/fs.yaml +++ b/shellfirm/tests/checks/fs.yaml @@ -356,6 +356,18 @@ - test: 'cat "test" >> file.txt' description: "append redirect should not match (only single > triggers)" expect_ids: [] +- test: "which cargo-tauri 2>/dev/null" + description: "redirect stderr to /dev/null should not match" + expect_ids: [] +- test: "npx tauri --version 2>/dev/null" + description: "redirect stderr to /dev/null should not match" + expect_ids: [] +- test: "echo test >/dev/null" + description: "redirect stdout to /dev/null should not match" + expect_ids: [] +- test: "command -v foo &>/dev/null" + description: "redirect all to /dev/null should not match" + expect_ids: [] # -- fs:gdisk_disk_modify -- - test: "gdisk /dev/sda"