change regexpMatch to regexpFind

This commit is contained in:
Erik Krogh Kristensen
2020-02-24 13:11:30 +01:00
parent a768e937f0
commit 051de247b0

View File

@@ -102,7 +102,7 @@ class UselessCat extends CommandCall {
)
) and
// wildcards, pipes, redirections, other bash features, and multiple files (spaces) are OK.
not getNonCommandConstantString().regexpMatch(".*(\\*|\\||>|<| |\\$|&|,|\\`).*") and
not exists(getNonCommandConstantString().regexpFind("\\*|\\||>|<| |\\$|&|,|\\`", _, _)) and
// Only acceptable option is "encoding", everything else is non-trivial to emulate with fs.readFile.
(
not exists(getOptionsArg())