mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Fix "expr: syntax error" on macOS
The version of expr shipped on macOS does not support `substr` command and prints `expr: syntax error`. Change the invocation of `expr` to use the `:` operator which match rhs regexp into lhs string and return the length of the match. This should be supported by all versions of `expr` that are POSIX compliant. Bug: 1199260 Change-Id: Ib932702fedbbbc772d65086ebc371dc0a9023c0e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2827931 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Dirk Pranke <dpranke@google.com> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
This commit is contained in:
committed by
LUCI CQ
parent
b1cc5ed9e8
commit
5506fbfba0
Reference in New Issue
Block a user