Skip to content

Commit d8d62e6

Browse files
committed
Merge branch 'tb/test-lint-sed-options'
The test lint learned to catch non-portable "sed" options. * tb/test-lint-sed-options: test-lint: only use only sed [-n] [-e command] [-f command_file]
2 parents ecbe1be + e62e225 commit d8d62e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/check-non-portable-shell.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ sub err {
3636
}
3737

3838
/\bcp\s+-a/ and err 'cp -a is not portable';
39-
/\bsed\s+-i/ and err 'sed -i is not portable';
39+
/\bsed\s+-[^efn]\s+/ and err 'sed option not portable (use only -n, -e, -f)';
4040
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
4141
/^\s*declare\s+/ and err 'arrays/declare not portable';
4242
/^\s*[^#]\s*which\s/ and err 'which is not portable (use type)';

0 commit comments

Comments
 (0)