Bridge For Git - grep: invalid option -- P
search cancel

Bridge For Git - grep: invalid option -- P

book

Article ID: 391947

calendar_today

Updated On:

Products

Endevor

Issue/Introduction

 pre-push hook installed locally - Received this message:

[info] grep: invalid option -- P

usage: grep [options] pattern [files]

[-e pattern] [-f file] [--binary-files=value] [--color=when]

[--context[=num]] [--directories=action] [--label] [--line-buffered]

[--null] [pattern] [file ...]

error: failed to push some refs to 'https://<your.github.url.com>/'

Environment

Bridge For Git :2.15.2 and lower

MacOS

Resolution

The script is failing because it is executed on a machine that is running an old version of grep install that does not support perl regular expression(regex) which is typical for mac os user.

This can be workaround by:

  • Making sure that default grep is the one that supports perl regular expression(regex):It can be ggrep
  • Installing a later fix :BR4G  2.15.3 or higher
 
Bridge for Git version 2.15.3 release
Fixes:
  • support for Java 17 when the app is built using Java 8
  • Pre-push script is now conformant with MacOS
  • Log file download when using cluster mode
  • MF Webhook retry fixed

Additional Information

Please note that just having the fix does not immediately propagate the new script (without -P) at all the mappings to all developer workstations. Nevertheless;it should work fine for mappings that are newly cloned.