test-lint: detect 'export FOO=bar'
Some shells do not understand the one-line construct, and instead need FOO=bar && export FOO Detect this in the test-lint target. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
38678a15a2
commit
9968ffff0d
@ -21,6 +21,7 @@ while (<>) {
|
||||
/^\s*declare\s+/ and err 'arrays/declare not portable';
|
||||
/^\s*[^#]\s*which\s/ and err 'which is not portable (please use type)';
|
||||
/test\s+[^=]*==/ and err '"test a == b" is not portable (please use =)';
|
||||
/^\s*export\s+[^=]*=/ and err '"export FOO=bar" is not portable (please use FOO=bar && export FOO)';
|
||||
# this resets our $. for each file
|
||||
close ARGV if eof;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user